JavaScript Edu Resources. Angular Courses. React Tutorials. Join us!

Routing in Angular 2 Depreciated

  • In order to use the new router, we need to import all needed components from the Angular framework and bind them to our component’s injector.
  • The router exports a couple of other components that are needed thoughout our application, but we’ll cover them later in this article.
  • Alright, now that we know what are, we can import and use them when bootstrapping our application, to make the router components available in our component’s dependency injector.
  • If you’ve read our first article on the new router, you know that there’s a directive called that lets us define a place in our template to display the loaded component.
  • In order to tell the router what to load into those siblings, we can give them names and reference them to components accordingly in our route configuration.

Routing in Angular by thoughtram

Comments are closed, but trackbacks and pingbacks are open.