December 2017
Beginner
372 pages
10h 32m
English
Now, our Homepage component is ready, but we still need to stitch it together with our app. As we know from our learning in Angular, we need to define a route to our Homepage component.
Because our Homepage is the default page of the application, the route defined will also be the default route. The following is the code we have in our app.route file:
import { HomepageComponent } from "./homepage/homepage.component";export const appRoutes: any = [ { path: "", component: HomepageComponent },];export const appComponents: any = [ HomepageComponent,];This code is very similar to the routes that we defined in our web application, with one difference: a new constant, appComponents. This difference is just another ...
Read now
Unlock full access