Explore the dynamic world of AI and its applications through our blog. Discover trending topics like machine learning, computer vision, AI in healthcare and finance, NLP, robotics, and more. Stay informed about the latest AI advancements and ethical considerations.
15 August, 2021
How to fix Kubernetes CrashLoopBackOff
02 August, 2021
Angular 10: Can't bind to 'ngIf' since it isn't a known property of 'div'
Error: Angular 10: Can't bind to 'ngIf' since it isn't a known property of 'div'
or
can't bind to 'ngif' since it isn't a known property of 'ng-container' angular 11
Solutions:
Make sure to import CommonModule from the module that is providing your component. for me I had to import CommonMudel in the TestComponent
BrowserModule vs CommonModule
BrowserModule provides services that are essential to launch and run a browser app.
BrowserModule also re-exports CommonModule from @angular/common, which means that components in the AppModule module also have access to the Angular directives every app needs, such as NgIf and NgFor.
CommonModule (all the basics of Angular templating: bindings, *ngIf, *ngFor…), except in the first app module, because it’s already part of the BrowserModule