Update Angular 2 Music Store sample to latest Angular 2 and other dependencies. Switch from asp-ng2-prerender-module to the more general asp-prerender-module.

This commit is contained in:
SteveSandersonMS
2016-04-08 13:54:41 +01:00
parent 532da3de9f
commit 18a165d6f4
22 changed files with 754 additions and 59 deletions

View File

@@ -5,17 +5,15 @@ import { AlbumDetails } from '../album-details/album-details';
import { AlbumEdit } from '../album-edit/album-edit';
@ng.Component({
selector: 'admin-home'
selector: 'admin-home',
templateUrl: './ng-app/components/admin/admin-home/admin-home.html',
directives: [router.ROUTER_DIRECTIVES]
})
@router.RouteConfig([
{ path: 'albums', name: 'Albums', component: AlbumsList },
{ path: 'album/details/:albumId', name: 'AlbumDetails', component: AlbumDetails },
{ path: 'album/edit/:albumId', name: 'AlbumEdit', component: AlbumEdit }
])
@ng.View({
templateUrl: './ng-app/components/admin/admin-home/admin-home.html',
directives: [router.ROUTER_DIRECTIVES]
})
export class AdminHome {
}

View File

@@ -2,9 +2,7 @@ import * as ng from 'angular2/core';
import * as models from '../../../models/models';
@ng.Component({
selector: 'album-delete-prompt'
})
@ng.View({
selector: 'album-delete-prompt',
templateUrl: './ng-app/components/admin/album-delete-prompt/album-delete-prompt.html'
})
export class AlbumDeletePrompt {

View File

@@ -5,9 +5,7 @@ import { Http, HTTP_BINDINGS } from 'angular2/http';
import { AlbumDeletePrompt } from '../album-delete-prompt/album-delete-prompt';
@ng.Component({
selector: 'album-details'
})
@ng.View({
selector: 'album-details',
templateUrl: './ng-app/components/admin/album-details/album-details.html',
directives: [router.ROUTER_DIRECTIVES, AlbumDeletePrompt]
})

View File

@@ -9,9 +9,7 @@ import { FormField } from '../form-field/form-field';
import * as AspNet from 'angular2-aspnet';
@ng.Component({
selector: 'album-edit'
})
@ng.View({
selector: 'album-edit',
templateUrl: './ng-app/components/admin/album-edit/album-edit.html',
directives: [router.ROUTER_DIRECTIVES, AlbumDeletePrompt, FormField, FORM_DIRECTIVES]
})

View File

@@ -5,9 +5,7 @@ import * as models from '../../../models/models';
import { AlbumDeletePrompt } from '../album-delete-prompt/album-delete-prompt';
@ng.Component({
selector: 'albums-list'
})
@ng.View({
selector: 'albums-list',
templateUrl: './ng-app/components/admin/albums-list/albums-list.html',
directives: [router.ROUTER_DIRECTIVES, AlbumDeletePrompt]
})

View File

@@ -3,9 +3,7 @@ import { AbstractControl } from 'angular2/common';
@ng.Component({
selector: 'form-field',
properties: ['label', 'validate']
})
@ng.View({
properties: ['label', 'validate'],
templateUrl: './ng-app/components/admin/form-field/form-field.html'
})
export class FormField {