mirror of
https://github.com/aspnet/JavaScriptServices.git
synced 2025-12-25 02:57:31 +00:00
Update Angular2Spa to current versions of Angular 2, angular2-universal-preview, etc.
This commit is contained in:
@@ -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 {
|
||||
}
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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]
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user