What is Angular Routing?

I'm new to this topic. In my linuxmint 17, I'm trying to start creating Firebase web app using Angular CLI. It asks me about Angular routing.

What is Angular routing? What do I have to answer?


As they already said, routing enables navigation to different views of your application. It is the main way of taking users to different destinations within the web app. From home page to the contact page, for example, you need a route, meaning a path or a way to take you there.The concept is not particular to Angular. You see this approach in most of the MVC frameworks (ASP.Net, Ruby on Rails, Django, Laravel, etc)

What you should answer. Answer yes. You are starting so it is good because you will have a basic structure to start. As you mature, you will able to set your own routes and manage them using middlewares


The Angular Router enables navigation from one view to the next as users perform application tasks.

Check https://angular.io/guide/router for more details about routing in Angular.

If you say "Yes" then CLI will automatically add router configuration to your project.


If you are creating an Angular project with the latest CLI, It asks you for adding angular routing to your project, which is a newly introduced feature by Angular CLI. If you type 'Y' while creating a project it adds 'app-routing.module.ts' otherwise no such file will be added. But routing feature will be embedded in the 'app.module.ts' file.

So both options will not affect much when you are a fresher to the Angular. Once you learn Angular Routing concept you will be having a better Idea.

For more information about Angular Routing visit angular official routing document.


You can try this ..

ng new demo-app --routing --style=sass

Which will add the routing module and set the style to sass ahead-of-time, so it will just do it without asking.

Note: you can also add --strict to avoid it asking for stricter type checking ng new demo-app --routing --style=sass --strict