November 2019
Beginner
804 pages
20h 1m
English
The next step is to import the NgModule book in the app module so that we can use its components:
import { BookModule } from './book/book.module';...@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule,
BookModule, // <-- Add this line
],
providers: [],
bootstrap: [AppComponent],
})
export class AppModule {
}
Great! With that done, we can now display our component page in the application. Let's update the app component's template.
To do so, edit the app.component.html file and add book-page under the title, as follows:
<h1>{{ title }}</h1>
<app-book-page></app-book-page>
At this point, our book page should be displayed. Let's now move on to the styling.
Read now
Unlock full access