Go ProSign in

This Lesson is for Members

Subscribe today and get access to all lessons! Plus direct HD download for offline use, enhances transcripts, member comment forums, and iTunes "podcast" RSS feed. Level up your skills now!

Unlock This Lesson

Already subscribed? Sign In

Create Application Layout with Components in an Angular CLI Project

In this lesson we will our UiModule, that has a LayoutComponent, HeaderComponent and FooterComponent.

We generate UiModule by running the following command:

ng generate module ui --module app

This generates the new module and imports it in our AppModule.

We'll create the LayoutComponent using:

ng generate component ui/containers/layout
ng generate component ui/containers/header
ng generate component ui/containers/footer

We update our AppRoutingModule and add this component to our first route to make it visible.

The HeaderComponent and FooterComponent are referenced in the LayoutComponent and we implement the actual templates!

You must be a Member to view code