File

src/app/shared/components/notification/notification.component.ts

Implements

OnInit OnDestroy

Metadata

selector app-notification
styleUrls notification.component.scss
templateUrl ./notification.component.html

Constructor

constructor(httpInterceptor: HttpService)

Methods

ngOnInit
ngOnInit()
Returns: void
ngOnDestroy
ngOnDestroy()
Returns: void

Properties

loading
loading: any
notiSubs
notiSubs: Subscription
import { Component, OnInit, OnDestroy } from '@angular/core';
import { Observable } from 'rxjs/Observable';
import { Subscription } from 'rxjs/Subscription';
import { HttpService } from '../../../core/services/http';

@Component({
  selector: 'app-notification',
  templateUrl: './notification.component.html',
  styleUrls: ['./notification.component.scss']
})
export class NotificationComponent implements OnInit, OnDestroy {
  loading: any;
  notiSubs: Subscription;

  constructor(private httpInterceptor: HttpService) {
    this.notiSubs = this.httpInterceptor.loading.subscribe(
      data => this.loading = data
    );
  }

  ngOnInit() {
  }

  ngOnDestroy() {
    // this.notiSubs.unsubscribe();
  }

}
<div class="notify-container in" *ngIf="loading.hasError">
  <div class="notify-error notify-content">
    <div class="notify-error-message">
      <span class="notify-icon">!</span>
      <p class="notify-icon-text">
        {{loading.hasMsg}}
      </p>
    </div>
  </div>
</div>
Legend
Html element
Component
Html element with directive

results matching ""

    No results matching ""