profile-info.component.ts
1.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import {StateConfig, Component, Inject, provide} from 'ng-forward';
import {ProfileService} from "../../../lib/ng-noosfero-api/http/profile.service";
import {ProfileDataComponent} from "../data/profile-data.component";
import {TranslateProfile} from "../../shared/pipes/translate-profile.filter";
@Component({
selector: 'profile',
templateUrl: "app/profile/info/profile-info.html",
providers: [provide('profileService', { useClass: ProfileService })],
directives: [ProfileDataComponent],
pipes: [TranslateProfile]
})
@Inject(ProfileService)
@Inject("amDateFormatFilter")
export class ProfileInfoComponent {
activities: any;
profile: noosfero.Profile;
showInformation: boolean = false;
constructor(private profileService: ProfileService, private amDateFormatFilter: any) {
this.init();
this.showInformation = false;
}
toggleInformation() {
console.log(this.showInformation);
console.log("argila");
this.showInformation = !this.showInformation;
console.log(this.showInformation);
}
init() {
this.profileService.getCurrentProfile().then((profile: noosfero.Profile) => {
this.profile = profile;
});
}
}