Revision 55401
Added by Konstantinos Triantafyllou about 5 years ago
communities.component.ts | ||
---|---|---|
1 |
import {Component, Input, Output, EventEmitter} from '@angular/core'; |
|
2 |
import {ViewChild, ChangeDetectionStrategy} from '@angular/core'; |
|
3 |
import {ViewEncapsulation} from '@angular/core'; |
|
1 |
import {Component} from '@angular/core'; |
|
4 | 2 |
import {ActivatedRoute, Router} from '@angular/router'; |
5 |
import {Location} from '@angular/common'; |
|
6 | 3 |
import {Title, Meta} from '@angular/platform-browser'; |
7 | 4 |
|
8 |
import {Observable} from 'rxjs/Observable'; |
|
9 |
|
|
10 | 5 |
import "rxjs/add/observable/zip"; |
11 |
|
|
12 |
import {ConnectHelper} from '../openaireLibrary/connect/connectHelper'; |
|
13 | 6 |
import {EnvProperties} from '../openaireLibrary/utils/properties/env-properties'; |
14 |
|
|
15 |
import {ConfigurationService} from '../openaireLibrary/utils/configuration/configuration.service'; |
|
16 | 7 |
import {CommunitiesService} from '../openaireLibrary/connect/communities/communities.service'; |
17 | 8 |
import {SubscribeService} from '../openaireLibrary/utils/subscribe/subscribe.service'; |
18 | 9 |
import {CommunityInfo} from '../openaireLibrary/connect/community/communityInfo'; |
... | ... | |
31 | 22 |
|
32 | 23 |
export class CommunitiesComponent { |
33 | 24 |
public piwiksub: any; |
34 |
public subfunders: any; |
|
35 | 25 |
|
36 | 26 |
public pageTitle = "OpenAIRE" |
37 |
|
|
38 |
public communitiesResults = null; |
|
39 |
public communitiesToShow = null; |
|
40 |
|
|
41 | 27 |
public researchCommunities = []; |
42 | 28 |
public researchInitiatives = []; |
43 | 29 |
public subscriberOfCommunities = []; |
... | ... | |
56 | 42 |
constructor ( |
57 | 43 |
private route: ActivatedRoute, |
58 | 44 |
private _router: Router, |
59 |
private location: Location, |
|
60 | 45 |
private _meta: Meta, |
61 | 46 |
private _title: Title, |
62 | 47 |
private _piwikService:PiwikService, |
63 | 48 |
private _communitiesService:CommunitiesService, |
64 |
private _subscribeService: SubscribeService, |
|
65 |
private config: ConfigurationService) { |
|
49 |
private _subscribeService: SubscribeService) { |
|
66 | 50 |
|
67 | 51 |
var description = "OpenAIRE - Connect, Community Dashboard, research community"; |
68 | 52 |
var title = "OpenAIRE - Connect"; |
... | ... | |
101 | 85 |
this.subscriberOfCommunities = []; |
102 | 86 |
this.managerOfCommunities = []; |
103 | 87 |
|
104 |
this._communitiesService.getCommunities(this.properties, this.properties.communitiesAPI).subscribe(
|
|
88 |
this._communitiesService.getCommunitiesState().subscribe(
|
|
105 | 89 |
communitiesResults => { |
106 | 90 |
//this.communitiesResults = communitiesResults; |
107 | 91 |
//this.communitiesToShow = this.communitiesResults.slice(); |
Also available in: Unified diff
[Trunk|Connect]: 1. Remove some no used services from communitiesModule and StatisticModule. 2. Initialize communities only on app component and use getCommunitiesState to get communities.