NG8002: Can't bind to VAR since it isn't a known property of COMPONENT

Discussão em 'Angular' iniciado por Jeferson Fillipe Nolasco, Março 26, 2025.

  1. Please, can someone explain to me, why line 1 works fine, and line 2 not?

    <sued-text-link label="Jeferson"></sued-text-link>
    <sued-text-link [label]="'Jeferson2'"></sued-text-link>


    When I run ng serve, I got this:

    Error: src/app/app.component.html:4:17 - error NG8002: Can't bind to 'label' since it isn't a known property of 'sued-text-link'.
    1. If 'sued-text-link' is an Angular component and it has 'label' input, then verify that it is part of this module.
    2. If 'sued-text-link' 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.

    4 <sued-text-link [label]="'Jeferson2'"></sued-text-link>
    ~~~~~~~~~~~~~~~~~~~~~

    src/app/app.component.ts:6:16
    6 templateUrl: './app.component.html',
    ~~~~~~~~~~~~~~~~~~~~~~
    Error occurs in the template of component AppComponent.




    ✖ Failed to compile.

    Continue reading...

Compartilhe esta Página