Commit 8f533af571c4fc764cfbe627fcbecf5e907834e5

Authored by Victor Costa
1 parent c4e9ad27
Exists in master and in 1 other branch dev-fixes

Remove the old route configuration

src/app/index.route.ts
... ... @@ -1,11 +0,0 @@
1   -
2   -
3   -/** @ngInject */
4   -export function routeConfig($stateProvider: ng.ui.IStateProvider, $urlRouterProvider: ng.ui.IUrlRouterProvider) {
5   - $stateProvider
6   - .state("main.profile.settings", {
7   - url: "^/myprofile/:profile"
8   - });
9   -
10   - $urlRouterProvider.otherwise("/");
11   -}
src/app/index.ts
1 1 import {NoosferoApp} from "./index.module";
2 2 import {noosferoModuleConfig} from "./index.config";
3 3 import {noosferoAngularRunBlock} from "./index.run";
4   -import {routeConfig} from "./index.route";
5 4  
6 5 import {Main} from "./main/main.component";
7 6 import {bootstrap, bundle} from "ng-forward";
... ... @@ -28,5 +27,3 @@ NoosferoApp.addConstants("AUTH_EVENTS", AUTH_EVENTS);
28 27  
29 28 NoosferoApp.addConfig(noosferoModuleConfig);
30 29 NoosferoApp.run(noosferoAngularRunBlock);
31   -
32   -NoosferoApp.addConfig(routeConfig);
... ...
src/app/profile/myprofile.component.ts 0 → 100644
... ... @@ -0,0 +1,9 @@
  1 +import {Component} from "ng-forward";
  2 +
  3 +@Component({
  4 + selector: 'profile',
  5 + templateUrl: "app/profile/profile.html",
  6 +})
  7 +export class MyProfile {
  8 +
  9 +}
... ...
src/app/profile/profile.component.ts
... ... @@ -7,6 +7,7 @@ import {ContentViewerActions} from "../content-viewer/content-viewer-actions.com
7 7 import {NoosferoActivities} from "../components/noosfero-activities/activities.component";
8 8 import {ProfileService} from "../../lib/ng-noosfero-api/http/profile.service";
9 9 import {Notification} from "../components/notification/notification.component";
  10 +import {MyProfile} from "./myprofile.component";
10 11  
11 12 import * as noosferoModels from "./../models/interfaces";
12 13  
... ... @@ -39,6 +40,11 @@ import * as noosferoModels from "./../models/interfaces";
39 40 }
40 41 },
41 42 {
  43 + name: 'main.profile.settings',
  44 + url: "^/myprofile/:profile",
  45 + component: MyProfile
  46 + },
  47 + {
42 48 name: 'main.profile.cms',
43 49 url: "^/myprofile/:profile/cms",
44 50 component: Cms,
... ...