Can't bind to 'routerLink' since it isn't a known property of 'a'


ANSWERS:


The problem is that you forgot to add RouterModule to your NgModule component. In the RC this was added to the @Component({directives: [ROUTER_DIRECTIVES]}), however, this is now moved into @NgModule({ imports: [RouterModule]}).

When you define your routes, one of the components that you will import will be the RouterModule that you will use to call forRoot or forChild. When you import the route, this will be imported automatically.

So, you will get the RouterLink either this way, or via direct import into imports property of @NgModule.


Some of the syntax has changed since rc-4, especially if you were not using router 3.0.

Follow the RouterLink Section here.

Few other things to check is the Configuration part that sets up the app.module.ts.

Hopefully this sets you in the right direction!



 MORE:


 ? Can't bind to 'routerLink' since it isn't a known property of 'a'. ("<header id="header">
 ? Angular 2 - Error "Property 'iconName' does not exist on type 'StateParams'
 ? Angular 2 - Error "Property 'iconName' does not exist on type 'StateParams'
 ? Angular 2 - Error "Property 'iconName' does not exist on type 'StateParams'
 ? TypeScript Build Error : Property does not exist on type 'IStateParamsService'
 ? Angular 2 router Error: Uncaught (in promise): TypeError: Cannot read property 'resolve' of undefined
 ? Angular 2 router Error: Invalid configuration of route 'undefined'
 ? Angular 2.0.1 Router EmptyError: no elements in sequence
 ? How does Angular find auxillary router-outlet tags to use
 ? How does Angular find auxillary router-outlet tags to use