page-not-found.component.ts* ngIf travail ne marche pas tout le temps
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>
le problème est *ngif
ne fonctionne pas. J'ai redémarré mon système et effacé le cache. Je reçois l'erreur suivante:
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>
'
' –