Lesson 201
Component Heirarchy
This Lesson’s Focus
- Create components and setup routing
At CoderGirl
Do On Your Own
In your codergirl-app:
- Create a new module
ng generate module dashboard —routing
- Create four components inside the dashboard module
ng generate component dashboard/videoDashboardng generate component dashboard/videoListng generate component dashboard/videoPlayerng generate component dashboard/statFilters
- Setup routing
- You should have one real route called
dashboard. If the user tries to go to the “empty route”(i.e.path: ''), they should be redirected to “/dashboard.” - The dashboard module should load the DashboardComponent for its empty route.
- Refer to lesson 105 and the StackBlitz homework for a reminder how to do this. Make sure the magic string in app-routing.module.ts is formed properly.
- Clean up the
app.component.htmlso it is just showing your router outlet.
- You should have one real route called
- Use an instance of each of the other three components inside your
video-dashboard.component.html