PurpleAdmin-Free-Angular-Admin-Template icon indicating copy to clipboard operation
PurpleAdmin-Free-Angular-Admin-Template copied to clipboard

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

Open dharmeshsharma opened this issue 5 years ago • 1 comments

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

dharmeshsharma avatar Jan 07 '20 12:01 dharmeshsharma

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

william-levi avatar Mar 24 '20 01:03 william-levi