import {Component, Inject, Input, provide} from 'ng-forward'; import {ProfileService} from "../../../lib/ng-noosfero-api/http/profile.service"; import {TranslateProfile} from "../../shared/pipes/translate-profile.filter"; @Component({ selector: 'profile-wall', templateUrl: "app/profile/wall/profile-wall.html", providers: [provide('profileService', { useClass: ProfileService })], pipes: [TranslateProfile] }) @Inject(ProfileService) export class ProfileWallComponent { @Input() profile: noosfero.Profile; activities: noosfero.Activity[]; constructor(private profileService: ProfileService) { } ngOnInit() { this.profileService.getActivities(this.profile.id) .then((response: restangular.IResponse) => { this.activities = response.data.activities; }); } }