@@ -66,13 +66,16 @@ import {
6666} from '@angularclass/hmr' ;
6767< % _ if ( filters . uirouter ) { - % >
6868import { UIRouterModule } from 'ui-router-ng2' ; < % } % >
69+ < % _ if ( filters . ngroute ) { - % >
70+ import { RouterModule, Routes } from '@angular/router' ; < % } % >
6971import { provideAuth } from 'angular2-jwt';
7072
7173import { AppComponent } from './app.component';
7274import { MainModule } from './main/main.module';
75+ import { MainComponent } from './main/main.component';
7376import { DirectivesModule } from '../components/directives.module';
74- import { AccountModule } from './account/account.module';
75- import { AdminModule } from './admin/admin.module';
77+ // import { AccountModule } from './account/account.module';
78+ // import { AdminModule } from './admin/admin.module';
7679
7780import constants from './app.constants';
7881
@@ -95,16 +98,34 @@ if(constants.env === 'development') {
9598 providers . push ( { provide : RequestOptions , useClass : HttpOptions } ) ;
9699}
97100
101+ const appRoutes: Routes = [
102+ //{ path : 'crisis-center' , component : CrisisListComponent } ,
103+ //{ path : 'hero/:id' , component : HeroDetailComponent } ,
104+ {
105+ path : 'home' ,
106+ component : MainComponent ,
107+ data : { title : 'Home' }
108+ } ,
109+ { path : '' ,
110+ redirectTo : '/home' ,
111+ pathMatch : 'full'
112+ } ,
113+ //{ path : '** ', component: PageNotFoundComponent }
114+ ] ;
115+
98116@NgModule ( {
99117 providers,
100118 imports : [
101119 BrowserModule ,
102120 HttpModule ,
103- UIRouterModule . forRoot ( ) ,
121+ < % _ if ( filters . uirouter ) { - % >
122+ UIRouterModule . forRoot ( ) , < % } % >
123+ < % _ if ( filters . ngroute ) { - % >
124+ RouterModule . forRoot ( appRoutes , { enableTracing : true } ) , < % } % >
104125 MainModule,
105126 DirectivesModule,
106- AccountModule ,
107- AdminModule ,
127+ // AccountModule,
128+ // AdminModule,
108129 ],
109130 declarations: [
110131 AppComponent,
0 commit comments