typescript - Angular 2 Error while routing to another component -


i using angular 2 beta 17 error occurs.when trying route component. kindly guide me. thankful you.

enter image description here

 import {component} 'angular2/core'; import {http, http_providers} 'angular2/http'; import {mvccomponent} "./components/mvc.component"; import {location} 'angular2/platform/common'; import {router, routedefinition, routeconfig, router_directives} "angular2/router"; @component({     selector: 'my-app',     templateurl: './appscripts/layout/sidebar.html',     directives: [router_directives] })  @routeconfig([     {         path: '/index',         name: 'index',         component: mvccomponent,         useasdefault: true     } ])   export class appcomponent {     profileimageurl: string = './images/flat-avatar.png';     public routes: routedefinition[] = null;     constructor(private router: router,         private location: location) {      }      getlinkstyle(route: routedefinition) {         return this.location.path().indexof(route.path) > -1;     } } 

i think forgot include following file in main html file:

<script src="node_modules/angular2/bundles/router.dev.js"></script> 

Comments

Popular posts from this blog

javascript - Laravel datatable invalid JSON response -

java - Exception in thread "main" org.springframework.context.ApplicationContextException: Unable to start embedded container; -

sql server 2008 - My Sql Code Get An Error Of Msg 245, Level 16, State 1, Line 1 Conversion failed when converting the varchar value '8:45 AM' to data type int -