Angular 19: 'imports' is only valid on a component that is standalone

Discussão em 'Angular' iniciado por Thomas, Novembro 19, 2024.

  1. Thomas

    Thomas Guest

    I updated my Angular 18 applications (with standalone components standalone: true) to Angular 19 using ng update:

    ❯ Updates non-standalone Directives, Component and Pipes to 'standalone:false'
    and removes 'standalone:true' from those who are standalone.


    So far so good, all standalone: true are removed.

    However, Visual Studio Code is now issuing following error for imports: [RouterLink, ...]:

    'imports' is only valid on a component that is standalone.


    What did I miss?

    I followed this guide:


    Continue reading...

Compartilhe esta Página