Join Justin Schwartzenberger for an in-depth discussion in this video Router outlets, part of Angular 2 Essential Training (2016).
- View Offline
- Exercise Files
- Code Practice
- [Voiceover] So the application now has some…routes configured to some components,…but where are those components going to…get rendered at when the routes are matched?…Well, the Angular module has a router outlet…directive for just that.…Router outlet is a structural directive.…It targets an element with the name router-outlet.…The RouteConfig decorator we put on the app.component…will create a router for that component.…Its route definitions will be used to load components…at the router-outlet in the app.component template.…To implement this, we need to bring in Router_directives…to use the Router-outlet directive.…
So in the app.component.ts file we add…Router_directives to to the import statement…for angular2/router and replace…the other components in the directives…metadata array with this one.…We no longer need those in here because…routing will handle loading them for us.…Over in the app.component.html file…we can add a router-outlet where we want…the component to be loaded at.…So let's replace the media-item-form and…
- What is Angular?
- Setting up an Angular template
- Creating a component
- Displaying data
- Working with events
- Using two-way data binding
- Creating a subcomponent
- Using the built-in HTTP module
- Using the built-in router module
Skill Level Intermediate
AngularJS and WordPress: Building a Single-Page Applicationwith Roy Sivan31m 52s Intermediate
Building a Mobile App with AngularJS 1 and Ionicwith Ray Villalobos3h 31m Intermediate
1. Architecture Overview
3. Directives and Pipes
5. Dependency Injection and Services
Next steps1m 20s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.