Project

General

Profile

« Previous | Next » 

Revision 60872

[Graph | Trunk]: Add meta data information to new pages

View differences:

home.component.ts
1
import {Component} from '@angular/core';
1
import {Component, OnDestroy, OnInit} from '@angular/core';
2 2
import {Subscription} from 'rxjs';
3 3
import {ActivatedRoute, Router} from '@angular/router';
4 4
import {Location} from '@angular/common';
......
18 18
  templateUrl: 'home.component.html',
19 19
  styleUrls: ['home.component.css']
20 20
})
21
export class HomeComponent {
21
export class HomeComponent implements OnInit, OnDestroy {
22 22
  public pageTitle = 'OpenAIRE - Research Graph';
23 23
  public portals: any[] = portals;
24 24
  public state: number = 0;
......
79 79
  }
80 80
  
81 81
  public ngOnDestroy() {
82
    for (let sub of this.subs) {
83
      sub.unsubscribe();
84
    }
82
    this.subs.forEach(sub => {
83
      if(sub instanceof Subscription) {
84
        sub.unsubscribe();
85
      }
86
    });
85 87
    this.clearTimeouts();
86 88
  }
87 89
  

Also available in: Unified diff