import { Component } from '@angular/core';
@Component({
selector: 'prefix-app',
template: `
<router-outlet></router-outlet>
`
})
export class AppComponent { }
Angular Root Component
In the above code, we are importing the Component from @angular/core. We are also specifying that our AppComponent class will be exported. This means that outside of our AppComponent class, we can reference the RouterOutlet.
Shortcut: a_component_root
0 Comments
Add Comment
Log in to add a comment