I encounter problems when I try to use RouteData in RouteData beta using TypeScript.
I insert it into the constructor and import it correctly
import {RouteConfig, Router, RouteData} from 'angular2/router'; export class App { constructor(public router: Router, public data: RouteData) {
I get No provider for RouteData! (App -> RouteData) No provider for RouteData! (App -> RouteData) .
If I include it in a component annotation like this
@Component({
I get this error: Cannot resolve all parameters for RouteData(?). Make sure they all have valid type or annotations. Cannot resolve all parameters for RouteData(?). Make sure they all have valid type or annotations.
source share