Revision 60872
Added by Konstantinos Triantafyllou almost 3 years ago
resources.component.ts | ||
---|---|---|
1 |
import {Component, OnInit} from '@angular/core'; |
|
1 |
import {Component, OnDestroy, OnInit} from '@angular/core';
|
|
2 | 2 |
import {Meta, Title} from '@angular/platform-browser'; |
3 | 3 |
import {Breadcrumb} from "../openaireLibrary/utils/breadcrumbs/breadcrumbs.component"; |
4 | 4 |
import {ActivatedRoute, Router} from '@angular/router'; |
... | ... | |
13 | 13 |
templateUrl: 'resources.component.html', |
14 | 14 |
styleUrls: ['resources.component.css'], |
15 | 15 |
}) |
16 |
export class ResourcesComponent implements OnInit { |
|
16 |
export class ResourcesComponent implements OnInit, OnDestroy {
|
|
17 | 17 |
properties:EnvProperties; |
18 | 18 |
subs: Subscription[] = []; |
19 | 19 |
description = "Start building with OpenAIRE APIs. How to access the graph? XML Metadata schema and documentation."; |
... | ... | |
48 | 48 |
} |
49 | 49 |
|
50 | 50 |
public ngOnDestroy() { |
51 |
for (let sub of this.subs) { |
|
52 |
sub.unsubscribe(); |
|
53 |
} |
|
51 |
this.subs.forEach(sub => { |
|
52 |
if(sub instanceof Subscription) { |
|
53 |
sub.unsubscribe(); |
|
54 |
} |
|
55 |
}); |
|
54 | 56 |
} |
55 | 57 |
} |
Also available in: Unified diff
[Graph | Trunk]: Add meta data information to new pages