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
@@ -59,4 +59,4 @@ require("./profile/profile.controller.js"); | @@ -59,4 +59,4 @@ require("./profile/profile.controller.js"); | ||
59 | 59 | ||
60 | // NoosferoApp.addController("ContentViewerController", ContentViewerController); | 60 | // NoosferoApp.addController("ContentViewerController", ContentViewerController); |
61 | 61 | ||
62 | -// NoosferoApp.addConfig(routeConfig); | 62 | +NoosferoApp.addConfig(routeConfig); |
src/app/main/main.controller.ts
1 | import {bundle, Component, StateConfig} from 'ng-forward'; | 1 | import {bundle, Component, StateConfig} from 'ng-forward'; |
2 | 2 | ||
3 | @Component({ | 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,14 +15,13 @@ export class Main2 { | ||
15 | @StateConfig([ | 15 | @StateConfig([ |
16 | { | 16 | { |
17 | url: '/', | 17 | url: '/', |
18 | - component: Main2, | ||
19 | - // templateUrl: "app/main/main.html", | 18 | + component: MainContent, |
20 | name: 'main', | 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 | export class Main { | 27 | export class Main { |