Skip to content

Commit 4df2f75

Browse files
committedAug 4, 2017
feat(client:admin): add routing
1 parent 8f7c295 commit 4df2f75

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed
 

‎templates/app/client/app/admin(auth)/admin.module.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,19 @@ import { RouterModule, Routes } from '@angular/router';<% } %>
77

88
import { AdminComponent } from './admin.component';
99

10-
<%_ if(filters.ngroute) { -%>
11-
import { ROUTES } from './admin.routes';<% } %>
1210
<%_ if(filters.uirouter) { -%>
1311
import { STATES } from './admin.routes';<% } %>
12+
<%_ if (filters.ngroute) { -%>
13+
const adminRoutes: Routes = [{
14+
path: 'admin',
15+
component: AdminComponent,
16+
}];<% } %>
1417

1518
@NgModule({
1619
imports: [
1720
BrowserModule,
1821
<%_ if(filters.ngroute) { _%>
19-
RouterModule.forChild(ROUTES),<% } %>
22+
RouterModule.forChild(adminRoutes),<% } %>
2023
<%_ if(filters.uirouter) { _%>
2124
UIRouterModule.forChild({
2225
states: STATES,

0 commit comments

Comments
 (0)
Please sign in to comment.