mirror of
https://github.com/aspnet/JavaScriptServices.git
synced 2025-12-25 19:17:30 +00:00
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:
@@ -9,7 +9,10 @@ import { AdminHome } from '../admin/admin-home/admin-home';
|
||||
import * as models from '../../models/models';
|
||||
|
||||
@ng.Component({
|
||||
selector: 'app'
|
||||
selector: 'app',
|
||||
templateUrl: './ng-app/components/app/app.html',
|
||||
styleUrls: ['./ng-app/components/app/app.css'],
|
||||
directives: [router.ROUTER_DIRECTIVES]
|
||||
})
|
||||
@router.RouteConfig([
|
||||
{ path: '/', component: Home, name: 'Home' },
|
||||
@@ -18,11 +21,6 @@ import * as models from '../../models/models';
|
||||
{ path: '/genres', component: GenresList, name: 'GenresList' },
|
||||
{ path: '/admin/...', component: AdminHome, name: 'Admin' }
|
||||
])
|
||||
@ng.View({
|
||||
templateUrl: './ng-app/components/app/app.html',
|
||||
styleUrls: ['./ng-app/components/app/app.css'],
|
||||
directives: [router.ROUTER_DIRECTIVES]
|
||||
})
|
||||
export class App {
|
||||
public genres: models.Genre[];
|
||||
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
import { bootstrap } from 'angular2/platform/browser';
|
||||
import { FormBuilder } from 'angular2/common';
|
||||
import * as router from 'angular2/router';
|
||||
import { Http, HTTP_PROVIDERS } from 'angular2/http';
|
||||
import { CACHE_PRIMED_HTTP_PROVIDERS } from 'angular2-aspnet';
|
||||
import { App } from './app';
|
||||
|
||||
bootstrap(App, [router.ROUTER_BINDINGS, HTTP_PROVIDERS, CACHE_PRIMED_HTTP_PROVIDERS, FormBuilder]);
|
||||
Reference in New Issue
Block a user