### 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)`
Defined in src/app/shared/components/notification/notification.component.ts:13

### Methods

ngOnInit
`ngOnInit()`
Defined in src/app/shared/components/notification/notification.component.ts:21
Returns: `void`

ngOnDestroy
`ngOnDestroy()`
Defined in src/app/shared/components/notification/notification.component.ts:24
Returns: `void`

### Properties

loading
`loading: `any``
Defined in src/app/shared/components/notification/notification.component.ts:12

notiSubs
`notiSubs: `Subscription``
Defined in src/app/shared/components/notification/notification.component.ts:13

    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 ""