ページ-ない-found.component.ts* ngIfすべての時間を仕事doesntの
import { FormsModule, NgModel } from '@angular/forms';
import { ChangeDetectorRef, Component, ElementRef, OnInit, Renderer2, ViewChild, ViewEncapsulation } from '@angular/core';
import {CommonModule} from '@angular/common';
import {NgModule} from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { element } from 'protractor';
import { SplitButtonModule } from "primeng/primeng";
import { Router } from '@angular/router';
@Component({
selector: 'app-page-not-found',
templateUrl: './page-not-found.component.html',
styleUrls: ['./page-not-found.component.css']
})
export class PageNotFoundComponent implements OnInit {
constructor() { }
ngOnInit() {
}
}
page-not-found.component.html
<p *ngif=true>
page-not-found works!
</p>
問題が*ngif
では動作しません。システムを再起動してキャッシュをクリアしました。
Uncaught Error: Template parse errors: Property binding ngif not used by any directive on an embedded template. Make sure that the property name is spelled correctly and all directives are listed in the "@NgModule.declarations". ("[ERROR->]<p *ngif=true> page-not-found works! </p>
'
' –