Revision 60872
Added by Konstantinos Triantafyllou about 3 years ago
about.component.ts | ||
---|---|---|
1 |
import {Component, ElementRef, OnInit, ViewChild} from '@angular/core'; |
|
1 |
import {Component, ElementRef, OnDestroy, OnInit, ViewChild} from '@angular/core';
|
|
2 | 2 |
import {ActivatedRoute, Router} from '@angular/router'; |
3 | 3 |
import {Meta, Title} from '@angular/platform-browser'; |
4 | 4 |
import {Breadcrumb} from "../openaireLibrary/utils/breadcrumbs/breadcrumbs.component"; |
... | ... | |
15 | 15 |
templateUrl: 'about.component.html', |
16 | 16 |
styleUrls: ['about.component.css'], |
17 | 17 |
}) |
18 |
export class AboutComponent implements OnInit { |
|
18 |
export class AboutComponent implements OnInit, OnDestroy {
|
|
19 | 19 |
@ViewChild('tabs') tabs: ElementRef; |
20 | 20 |
public architectureImage: string = "gray.png"; |
21 | 21 |
public aggregationReadMore: boolean = false; |
... | ... | |
59 | 59 |
changeTab(index: number) { |
60 | 60 |
UIkit.switcher(this.tabs.nativeElement).show(index); |
61 | 61 |
} |
62 |
|
|
62 | 63 |
public ngOnDestroy() { |
63 |
for (let sub of this.subs) { |
|
64 |
sub.unsubscribe(); |
|
65 |
} |
|
64 |
this.subs.forEach(sub => { |
|
65 |
if(sub instanceof Subscription) { |
|
66 |
sub.unsubscribe(); |
|
67 |
} |
|
68 |
}); |
|
66 | 69 |
} |
67 |
|
|
68 | 70 |
} |
Also available in: Unified diff
[Graph | Trunk]: Add meta data information to new pages