mirror of
https://github.com/aspnet/JavaScriptServices.git
synced 2025-12-25 19:17:30 +00:00
Add Angular2Spa template
This commit is contained in:
22
templates/Angular2Spa/ClientApp/components/app/app.ts
Normal file
22
templates/Angular2Spa/ClientApp/components/app/app.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
import * as ng from 'angular2/core';
|
||||
import * as router from 'angular2/router';
|
||||
import { Http, HTTP_BINDINGS } from 'angular2/http';
|
||||
import { Home } from '../home/home.ts';
|
||||
import { About } from '../about/about';
|
||||
import { Counter } from '../counter/counter';
|
||||
|
||||
@ng.Component({
|
||||
selector: 'app'
|
||||
})
|
||||
@router.RouteConfig([
|
||||
{ path: '/', component: Home, name: 'Home' },
|
||||
{ path: '/about', component: About, name: 'About' },
|
||||
{ path: '/counter', component: Counter, name: 'Counter' }
|
||||
])
|
||||
@ng.View({
|
||||
template: require('./app.html'),
|
||||
styles: [require('./app.css')],
|
||||
directives: [router.ROUTER_DIRECTIVES]
|
||||
})
|
||||
export class App {
|
||||
}
|
||||
Reference in New Issue
Block a user