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 | export class NoosferoApp { | 3 | export class NoosferoApp { |
2 | 4 | ||
3 | - static appName: string = "noosferoApp"; | 5 | + static appName: string = (<any>Main).name; |
4 | 6 | ||
5 | static init() { | 7 | static init() { |
6 | angular.module(NoosferoApp.appName, ["ngAnimate", "ngCookies", "ngStorage", "ngTouch", | 8 | angular.module(NoosferoApp.appName, ["ngAnimate", "ngCookies", "ngStorage", "ngTouch", |
src/app/index.ts
src/app/main/main.controller.ts
1 | import {Component, StateConfig} from 'ng-forward'; | 1 | import {Component, StateConfig} from 'ng-forward'; |
2 | 2 | ||
3 | @Component({ | 3 | @Component({ |
4 | + selector: 'main2', | ||
5 | + template: `test main2` | ||
6 | +}) | ||
7 | +export class Main2 { | ||
8 | + | ||
9 | +} | ||
10 | + | ||
11 | +@Component({ | ||
4 | selector: 'main', | 12 | selector: 'main', |
5 | template: `aaaa <div ui-view></div>` | 13 | template: `aaaa <div ui-view></div>` |
6 | }) | 14 | }) |
@@ -9,7 +17,7 @@ import {Component, StateConfig} from 'ng-forward'; | @@ -9,7 +17,7 @@ import {Component, StateConfig} from 'ng-forward'; | ||
9 | url: '/', | 17 | url: '/', |
10 | component: Main2, | 18 | component: Main2, |
11 | // templateUrl: "app/main/main.html", | 19 | // templateUrl: "app/main/main.html", |
12 | - name: 'main2', | 20 | + name: 'main', |
13 | // resolve: { | 21 | // resolve: { |
14 | // currentUser: function(AuthService) { | 22 | // currentUser: function(AuthService) { |
15 | // return AuthService.loginFromCookie(); | 23 | // return AuthService.loginFromCookie(); |
@@ -20,11 +28,3 @@ import {Component, StateConfig} from 'ng-forward'; | @@ -20,11 +28,3 @@ import {Component, StateConfig} from 'ng-forward'; | ||
20 | export class Main { | 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