Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't bind to 'ngif' since it isn't a known property of 'app-navigation'. #2

Open
dharmeshsharma opened this issue Jan 7, 2020 · 1 comment

Comments

@dharmeshsharma
Copy link

I have found error in app.component.html for all structural directive which is not known property for custom elements.

****
****
****

Error:--

Error: Template parse errors:
Can't bind to 'ngif' since it isn't a known property of 'app-navigation'.

  1. If 'app-navigation' is an Angular component and it has 'ngif' input, then verify that it is part of this module.
  2. If 'app-navigation' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.
  3. To allow any property add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component. ("

    <app-navigation [ERROR ->]*ngif="showNavbar">

<ap"): ng:///AppModule/AppComponent.html@1:18
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 ->]<app-navigation *ngif="showNavbar">

<app-mainsidebar [ERROR ->]*ngif="showSidebar">


"): ng:///AppModule/AppComponent.html@3:19
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". ("n *ngif="showNavbar">

[ERROR ->]<app-mainsidebar *ngif="showSidebar">


"): ng:///AppModule/AppComponent.html@3:2
Can't bind to 'ngif' since it isn't a known property of 'app-footer'.

  1. If 'app-footer' is an Angular component and it has 'ngif' input, then verify that it is part of this module.
  2. If 'app-footer' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.
  3. To allow any property add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component. ("

<app-footer [ERROR ->]*ngif="showFooter">

"): ng:///AppModule/AppComponent.html@8:14 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 ->]<app-footer *ngif="showFooter">

"): ng:///AppModule/AppComponent.html@8:2

Need to set @output decorator.

Thanks
Dharmesh

@william-levi
Copy link

i think you mispelled *ngIf to *ngif
big "I"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants