Project

General

Profile

« Previous | Next » 

Revision 60872

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

View differences:

contact.component.ts
1
import {Component, OnInit, ViewChild} from '@angular/core';
1
import {Component, OnDestroy, OnInit, ViewChild} from '@angular/core';
2 2
import {ActivatedRoute, Router} from '@angular/router';
3 3
import {EmailService} from '../openaireLibrary/utils/email/email.service';
4 4
import {Email} from '../openaireLibrary/utils/email/email';
......
20 20
  styleUrls: ['contact.component.css']
21 21
})
22 22

  
23
export class ContactComponent implements OnInit {
23
export class ContactComponent implements OnInit, OnDestroy {
24 24
  public showLoading = true;
25 25
  public errorMessage = '';
26 26
  public email: Email;
......
152 152
  }
153 153
  
154 154
  public ngOnDestroy() {
155
    for (let sub of this.subs) {
156
      sub.unsubscribe();
157
    }
155
    this.subs.forEach(sub => {
156
      if(sub instanceof Subscription) {
157
        sub.unsubscribe();
158
      }
159
    });
158 160
  }
159 161
}

Also available in: Unified diff