mirror of
https://github.com/aspnet/JavaScriptServices.git
synced 2025-12-24 18:47:30 +00:00
feature(angular2spa): Angular 2.0, Universal 2.0, TS 2.0
This commit is contained in:
@@ -1,11 +1,9 @@
|
||||
import * as ng from '@angular/core';
|
||||
import { ROUTER_DIRECTIVES } from '@angular/router';
|
||||
import { Component } from '@angular/core';
|
||||
import { NavMenu } from '../nav-menu/nav-menu';
|
||||
|
||||
@ng.Component({
|
||||
@Component({
|
||||
selector: 'app',
|
||||
template: require('./app.html'),
|
||||
directives: [...ROUTER_DIRECTIVES, NavMenu]
|
||||
template: require('./app.html')
|
||||
})
|
||||
export class App {
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import * as ng from '@angular/core';
|
||||
import { Component } from '@angular/core';
|
||||
|
||||
@ng.Component({
|
||||
@Component({
|
||||
selector: 'counter',
|
||||
template: require('./counter.html')
|
||||
})
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import * as ng from '@angular/core';
|
||||
import { Component } from '@angular/core';
|
||||
import { Http } from '@angular/http';
|
||||
|
||||
@ng.Component({
|
||||
@Component({
|
||||
selector: 'fetch-data',
|
||||
template: require('./fetch-data.html')
|
||||
})
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import * as ng from '@angular/core';
|
||||
import { Component }from '@angular/core';
|
||||
|
||||
@ng.Component({
|
||||
@Component({
|
||||
selector: 'home',
|
||||
template: require('./home.html')
|
||||
})
|
||||
|
||||
8
templates/Angular2Spa/ClientApp/components/index.ts
Normal file
8
templates/Angular2Spa/ClientApp/components/index.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
// Here we can create "Barrels" so that it's easier to import everything
|
||||
// within /components
|
||||
|
||||
export * from './app/app';
|
||||
export * from './counter/counter';
|
||||
export * from './fetch-data/fetch-data';
|
||||
export * from './home/home';
|
||||
export * from './nav-menu/nav-menu';
|
||||
@@ -1,10 +1,8 @@
|
||||
import * as ng from '@angular/core';
|
||||
import { ROUTER_DIRECTIVES } from '@angular/router';
|
||||
import { Component } from '@angular/core';
|
||||
|
||||
@ng.Component({
|
||||
@Component({
|
||||
selector: 'nav-menu',
|
||||
template: require('./nav-menu.html'),
|
||||
directives: [...ROUTER_DIRECTIVES]
|
||||
template: require('./nav-menu.html')
|
||||
})
|
||||
export class NavMenu {
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user