routerDirectives top-level constant

const routerDirectives = const [RouterOutlet, RouterLink, RouterLinkActive]

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]