Revision 59106
Added by Konstantinos Triantafyllou almost 4 years ago
orp.component.ts | ||
---|---|---|
1 | 1 |
import {Component} from '@angular/core'; |
2 |
import {ActivatedRoute, Router} from "@angular/router"; |
|
3 |
import {StakeholderService} from "../../../openaireLibrary/monitor/services/stakeholder.service"; |
|
2 | 4 |
|
3 | 5 |
@Component({ |
4 | 6 |
selector: 'monitor-orp', |
5 | 7 |
template: ` |
6 | 8 |
<div id="page_content"> |
7 |
<result-landing type="orp"></result-landing> |
|
9 |
<result-landing *ngIf="initialized" type="orp"></result-landing>
|
|
8 | 10 |
</div> |
9 | 11 |
`, |
10 | 12 |
}) |
11 | 13 |
|
12 | 14 |
export class MonitorOrpComponent { |
15 |
initialized: boolean = false; |
|
16 |
|
|
17 |
constructor(private route: ActivatedRoute, |
|
18 |
private router: Router, |
|
19 |
private stakeholderService: StakeholderService) { |
|
20 |
} |
|
21 |
|
|
22 |
ngOnInit() { |
|
23 |
this.route.params.subscribe(params => { |
|
24 |
if (params['stakeholder']) { |
|
25 |
this.stakeholderService.getStakeholderAsObservable().subscribe(stakeholder => { |
|
26 |
if (stakeholder) { |
|
27 |
this.initialized = true; |
|
28 |
} |
|
29 |
}); |
|
30 |
} |
|
31 |
}); |
|
32 |
} |
|
13 | 33 |
} |
Also available in: Unified diff
[Monitor Dashboard | Trunk]: wait property initialization on search and langind pages