asp.net - angular 2 Error while routing -
i using angular 2.0.0-beta.0. following code right when use same code in angular 2.0.0-beta-17 showing errors.error image @ end of question kindly guide me. thankful you.
app.ts
import {component} "angular2/core"; import {asyncroute, router, routedefinition, routeconfig, location, router_directives} "angular2/router"; import {chartcomponent} "./components/chart.component"; import {chartscomponent} "./components/charts.component"; import {mvccomponent} "./components/mvc.component"; import {bootsrtap2component} "./components/bootstrap2.component"; import {bootstrapjavascriptcomponent} "./components/bootstrapjavascript.component"; declare var system: any; @routeconfig([ { path: '/chart', name: 'chart', component: chartcomponent }, { path: '/charts', name: 'charts', component: chartscomponent }, { path: '/index', name: 'index', component: mvccomponent, useasdefault: true }, { path: '/components', name: 'components', component: bootsrtap2component }, { path: '/javascipt', name: 'javascipt', component: bootstrapjavascriptcomponent } ]) @component({ selector: "app", templateurl: "/app/app.html", directives: [router_directives] }) 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; } }
errors
import location
import {location} 'angular2/platform/common';
see location , hashlocationstrategy stopped working in beta.16
Comments
Post a Comment