routerDirectives top-level constant
The main Router directives.
Attach to a @Component
's directives when using any other the Router
directives.
@Component(
selector: 'my-app',
directives: [routerDirectives]
template: '<router-outlet></router-outlet>'
)
class MyApp {}
Implementation
const routerDirectives = [RouterOutlet, RouterLink, RouterLinkActive];