Update Angular2Spa to current versions of Angular 2, angular2-universal-preview, etc.

This commit is contained in:
SteveSandersonMS
2016-03-31 16:41:24 +01:00
parent 033a42ab42
commit 89c8dd3b36
8 changed files with 24 additions and 29 deletions

View File

@@ -7,16 +7,14 @@ import { FetchData } from '../fetch-data/fetch-data';
import { Counter } from '../counter/counter';
@ng.Component({
selector: 'app'
selector: 'app',
template: require('./app.html'),
directives: [NavMenu, router.ROUTER_DIRECTIVES]
})
@router.RouteConfig([
{ path: '/', component: Home, name: 'Home' },
{ path: '/counter', component: Counter, name: 'Counter' },
{ path: '/fetch-data', component: FetchData, name: 'FetchData' }
])
@ng.View({
template: require('./app.html'),
directives: [NavMenu, router.ROUTER_DIRECTIVES]
})
export class App {
}

View File

@@ -1,9 +1,7 @@
import * as ng from 'angular2/core';
@ng.Component({
selector: 'counter'
})
@ng.View({
selector: 'counter',
template: require('./counter.html')
})
export class Counter {

View File

@@ -2,9 +2,7 @@ import * as ng from 'angular2/core';
import { Http } from 'angular2/http';
@ng.Component({
selector: 'fetch-data'
})
@ng.View({
selector: 'fetch-data',
template: require('./fetch-data.html')
})
export class FetchData {

View File

@@ -1,9 +1,7 @@
import * as ng from 'angular2/core';
@ng.Component({
selector: 'home'
})
@ng.View({
selector: 'home',
template: require('./home.html')
})
export class Home {

View File

@@ -2,9 +2,7 @@ import * as ng from 'angular2/core';
import * as router from 'angular2/router';
@ng.Component({
selector: 'nav-menu'
})
@ng.View({
selector: 'nav-menu',
template: require('./nav-menu.html'),
directives: [router.ROUTER_DIRECTIVES]
})