Commit 7bdf7c8671fda9117b3a841647ad8be06b61c2cd

Authored by ABNER SILVA DE OLIVEIRA
2 parents 4946a477 2da0f803

Merge branch 'ngforward' of softwarepublico.gov.br:noosfero-themes/angular-theme into ngforward

src/app/index.ts
... ... @@ -4,7 +4,7 @@ import {noosferoModuleConfig} from "./index.config";
4 4 import {noosferoAngularRunBlock} from "./index.run";
5 5 import {routeConfig} from "./index.route";
6 6 import {ContentViewerController} from "./content-viewer/content-viewer.controller";
7   -import {Main} from "./main/main.controller";
  7 +import {Main} from "./main/main.component";
8 8 import {bootstrap, bundle} from 'ng-forward';
9 9  
10 10 declare var moment: any;
... ... @@ -59,4 +59,4 @@ require("./profile/profile.controller.js");
59 59  
60 60 // NoosferoApp.addController("ContentViewerController", ContentViewerController);
61 61  
62   -// NoosferoApp.addConfig(routeConfig);
  62 +NoosferoApp.addConfig(routeConfig);
... ...
src/app/main/main.component.ts 0 → 100644
... ... @@ -0,0 +1,29 @@
  1 +import {bundle, Component, StateConfig} from 'ng-forward';
  2 +
  3 +@Component({
  4 + selector: 'main-content',
  5 + templateUrl: "app/main/main.html",
  6 +})
  7 +export class MainContent {
  8 +
  9 +}
  10 +
  11 +@Component({
  12 + selector: 'main',
  13 + template: '<div ng-view></div>'
  14 +})
  15 +@StateConfig([
  16 + {
  17 + url: '/',
  18 + component: MainContent,
  19 + name: 'main',
  20 + resolve: {
  21 + currentUser: function(AuthService) {
  22 + return AuthService.loginFromCookie();
  23 + }
  24 + }
  25 + }
  26 +])
  27 +export class Main {
  28 +
  29 +}
... ...
src/app/main/main.controller.ts
... ... @@ -1,30 +0,0 @@
1   -import {bundle, Component, StateConfig} from 'ng-forward';
2   -
3   -@Component({
4   - selector: 'main2',
5   - template: `test main2`
6   -})
7   -export class Main2 {
8   -
9   -}
10   -
11   -@Component({
12   - selector: 'main',
13   - template: `aaaa <ui-view></ui-view>`
14   -})
15   -@StateConfig([
16   - {
17   - url: '/',
18   - component: Main2,
19   - // templateUrl: "app/main/main.html",
20   - name: 'main',
21   - // resolve: {
22   - // currentUser: function(AuthService) {
23   - // return AuthService.loginFromCookie();
24   - // }
25   - // }
26   - }
27   -])
28   -export class Main {
29   -
30   -}