Commit c75bf148b08c91632a61b2f5f1519466b085023c
1 parent
a1f403ae
Exists in
master
and in
35 other branches
Add missing routes
Showing
2 changed files
with
10 additions
and
11 deletions
Show diff stats
src/app/index.ts
src/app/main/main.controller.ts
| 1 | 1 | import {bundle, Component, StateConfig} from 'ng-forward'; |
| 2 | 2 | |
| 3 | 3 | @Component({ |
| 4 | - selector: 'main2', | |
| 5 | - template: `test main2` | |
| 4 | + selector: 'main-content', | |
| 5 | + templateUrl: "app/main/main.html", | |
| 6 | 6 | }) |
| 7 | -export class Main2 { | |
| 7 | +export class MainContent { | |
| 8 | 8 | |
| 9 | 9 | } |
| 10 | 10 | |
| ... | ... | @@ -15,14 +15,13 @@ export class Main2 { |
| 15 | 15 | @StateConfig([ |
| 16 | 16 | { |
| 17 | 17 | url: '/', |
| 18 | - component: Main2, | |
| 19 | - // templateUrl: "app/main/main.html", | |
| 18 | + component: MainContent, | |
| 20 | 19 | name: 'main', |
| 21 | - // resolve: { | |
| 22 | - // currentUser: function(AuthService) { | |
| 23 | - // return AuthService.loginFromCookie(); | |
| 24 | - // } | |
| 25 | - // } | |
| 20 | + resolve: { | |
| 21 | + currentUser: function(AuthService) { | |
| 22 | + return AuthService.loginFromCookie(); | |
| 23 | + } | |
| 24 | + } | |
| 26 | 25 | } |
| 27 | 26 | ]) |
| 28 | 27 | export class Main { | ... | ... |