Commit 2b9b97cb808ec198ab9e358a5b3d878b56ff3130
1 parent
d3a3844a
Exists in
master
and in
35 other branches
Migrating main controller
Showing
4 changed files
with
13 additions
and
12 deletions
Show diff stats
src/app/index.module.ts
1 | +import {Main} from "./main/main.controller"; | |
2 | + | |
1 | 3 | export class NoosferoApp { |
2 | 4 | |
3 | - static appName: string = "noosferoApp"; | |
5 | + static appName: string = (<any>Main).name; | |
4 | 6 | |
5 | 7 | static init() { |
6 | 8 | angular.module(NoosferoApp.appName, ["ngAnimate", "ngCookies", "ngStorage", "ngTouch", | ... | ... |
src/app/index.ts
src/app/main/main.controller.ts
1 | 1 | import {Component, StateConfig} from 'ng-forward'; |
2 | 2 | |
3 | 3 | @Component({ |
4 | + selector: 'main2', | |
5 | + template: `test main2` | |
6 | +}) | |
7 | +export class Main2 { | |
8 | + | |
9 | +} | |
10 | + | |
11 | +@Component({ | |
4 | 12 | selector: 'main', |
5 | 13 | template: `aaaa <div ui-view></div>` |
6 | 14 | }) |
... | ... | @@ -9,7 +17,7 @@ import {Component, StateConfig} from 'ng-forward'; |
9 | 17 | url: '/', |
10 | 18 | component: Main2, |
11 | 19 | // templateUrl: "app/main/main.html", |
12 | - name: 'main2', | |
20 | + name: 'main', | |
13 | 21 | // resolve: { |
14 | 22 | // currentUser: function(AuthService) { |
15 | 23 | // return AuthService.loginFromCookie(); |
... | ... | @@ -20,11 +28,3 @@ import {Component, StateConfig} from 'ng-forward'; |
20 | 28 | export class Main { |
21 | 29 | |
22 | 30 | } |
23 | - | |
24 | -@Component({ | |
25 | - selector: 'Main2', | |
26 | - template: `test main2` | |
27 | -}) | |
28 | -export class Main2 { | |
29 | - | |
30 | -} | ... | ... |
src/app/main/main.html