diff --git a/src/app/index.ts b/src/app/index.ts index a02acd7..1537e81 100644 --- a/src/app/index.ts +++ b/src/app/index.ts @@ -5,6 +5,7 @@ import {noosferoAngularRunBlock} from "./index.run"; import {routeConfig} from "./index.route"; import {ContentViewer as noosferoContentViewer} from "./content-viewer/content-viewer.component"; +import {Profile as noosferoProfile} from "./profile/profile.component"; import {Main} from "./main/main.component"; import {bootstrap, bundle} from "ng-forward"; @@ -55,5 +56,6 @@ require("./profile-info/profile-info.controller.js"); require("./profile/profile-home.controller.js"); NoosferoApp.addController("ContentViewerController", noosferoContentViewer); +NoosferoApp.addController("ProfileController", noosferoProfile); NoosferoApp.addConfig(routeConfig); diff --git a/src/app/main/main.component.ts b/src/app/main/main.component.ts index 7fec39c..72671d9 100644 --- a/src/app/main/main.component.ts +++ b/src/app/main/main.component.ts @@ -10,9 +10,6 @@ import {Profile} from "../profile/profile.component"; templateUrl: "app/main/main.html", }) export class MainContent { - constructor() { - console.log("MAIN"); - } } @@ -40,6 +37,8 @@ export class MainContent { views: { "content": { templateUrl: "app/profile/profile.html", + controller: "ProfileController", + controllerAs: "vm" } } } diff --git a/src/app/profile/profile.component.ts b/src/app/profile/profile.component.ts index 346df8e..ce4d76c 100644 --- a/src/app/profile/profile.component.ts +++ b/src/app/profile/profile.component.ts @@ -4,7 +4,6 @@ import {Component, Inject} from 'ng-forward'; selector: 'profile', templateUrl: "app/profile/profile.html" }) - @Inject("noosfero", "$log", "$stateParams") export class Profile { @@ -12,7 +11,6 @@ export class Profile { profile: any constructor(noosfero, $log, $stateParams) { - console.log("PROFILE"); noosfero.profiles.one().get({ identifier: $stateParams.profile }).then((response) => { this.profile = response.data[0]; noosfero.setCurrentProfile(this.profile); diff --git a/src/app/profile/profile.html b/src/app/profile/profile.html index 1f22d9b..e69c9c0 100644 --- a/src/app/profile/profile.html +++ b/src/app/profile/profile.html @@ -1,5 +1,5 @@
- +
-- libgit2 0.21.2