@@ -3,15 +3,29 @@ import { FormsModule } from '@angular/forms';
3
3
import { BrowserModule } from '@angular/platform-browser' ;
4
4
< % _ if ( filters . uirouter ) { - % >
5
5
import { UIRouterModule } from 'ui-router-ng2' ; < % } % >
6
- < % _ if ( filters . ngroute ) { - % > < % } % >
6
+ < % _ if ( filters . ngroute ) { - % >
7
+ import { RouterModule, Routes } from '@angular/router' ; < % } % >
7
8
< % _ if ( filters . oauth ) { - % >
8
9
import { DirectivesModule } from '../../components/directives.module' ; < % } % >
9
10
10
11
import { STATES } from './account.routes';
11
12
12
13
import { LoginComponent } from './login/login.component';
13
- import { SignupComponent } from './signup/signup.component';
14
14
import { SettingsComponent } from './settings/settings.component';
15
+ import { SignupComponent } from './signup/signup.component';
16
+
17
+ < % _ if ( filters . ngroute ) { - % >
18
+ const accountRoutes: Routes = [{
19
+ path : 'login' ,
20
+ component : LoginComponent ,
21
+ //data: { title: 'Home' }
22
+ } , {
23
+ path : 'settings' ,
24
+ component : SettingsComponent ,
25
+ } , {
26
+ path : 'signup' ,
27
+ component : SignupComponent ,
28
+ } ] ; < % } %>
15
29
16
30
@NgModule ( {
17
31
imports : [
@@ -21,7 +35,8 @@ import { SettingsComponent } from './settings/settings.component';
21
35
UIRouterModule . forChild ( {
22
36
states : STATES ,
23
37
} ) , < % } % >
24
- < % _ if ( filters . ngroute ) { - % > < % } % >
38
+ < % _ if ( filters . ngroute ) { - % >
39
+ RouterModule . forChild ( accountRoutes ) , < % } % >
25
40
< % _ if ( filters . oauth ) { - % >
26
41
DirectivesModule , < % } % >
27
42
],
0 commit comments