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


https://twitter.com/
https://twitter.com/intent/tweet/?text=Routing%20in%20Angular&url=http://blog.thoughtram.io/angular/2015/06/16/routing-in-angular-2.html


Comments are closed, but trackbacks and pingbacks are open.