标签:from port ide component dir class app com for
import {Component} from ‘angular2/core‘;
import {bootstrap} from ‘angular2/platform/browser‘;
impor {RouteConfig, ROUTER_DIRECTIVES, ROUTER_BINDINGS} from ‘angular2/router‘;
‘angular2/router‘;
import {Home} from ‘./components/home/home‘;
import {About} from ‘./components/about/about‘;
@Component({
selector:‘app‘,
templateUrl:‘./app.html‘,
directives:[ROUTER_DIRECTIVES]
})
@RouteConfig({
{Path: ‘/‘,component:Home,name:‘home‘},
{Path:‘/about‘,component:About,name:‘about‘}
])
class App {}
bootstrap(App,{ROUTER_PROVIDERS]);
标签:from port ide component dir class app com for
原文地址:https://www.cnblogs.com/cheeseCatMiao/p/9305246.html