How do we add routing to an Angular library?

Discussão em 'Angular' iniciado por Optiq, Fevereiro 20, 2025.

  1. Optiq

    Optiq Guest

    I'm working on a micro frontend for an app I'm building and I want it to have routing. After generating my components and creating a routes.ts file, I realized there is no app.config.ts file to bootstrap them to the library. I'm using Angular 19 with standalone components and the only info I can find on the matter is from older versions of angular using NgModule and RouterModule. I came across a github bug report where someone was asking why they're not getting a prompt for if they want to add routing to their libraries upon generating and one of the maintainers said they opted to remove the prompt until they find a better way to include it wanting to keep things more focused on other configurations. So how do we set up routing in our libraries?

    Continue reading...

Compartilhe esta Página