Posts

Showing posts from May, 2021
Image
  Defining Child Routes In the last post  How organize your folders in Angular  we learned how to organize your folders for professional projects in angular, the next step usually managing the routes, usually, I add this responsibility to Angular Cli but, when I need a better organization, I need write my own file  "app-routing. module" and I will need to implement child routes. The child routes are identified with the label “children" and they are objects to any main route. We have the next routes in the file  "app-routing-module": We will need to manage one template for the dashboard and another for the login and register; the first step is to create a new component called pages: The path:’  ’ empty work with the routes into the children array, and the other routes work with other types for styles and templates. We add some content to the main page of the component page: Run the project and check the result in the browser: It is the result for the ...