I try to create a simple angular2 component, and I have an error when binding directive to a native DOM element.
For example:
/// <reference path="../../typings/_custom.d.ts" />
import { Component, View } from 'angular2/angular2';
import { RouterLink } from 'angular2/router';
@Component({
selector: 'my-component',
directives: [RouterLink]
})
@View({
template: `
<a [router-link]="['/page']">test</a>
`
})
export class MyComponent { }
=> Can't bind to 'routerLink' since it isn't a known property of the '<a>' element and there are no matching directives with a corresponding property.
What did I do wrong?