import { Component , ViewContainerRef , ViewChild , Inject } from '@angular/core' ; import { Router } from '@angular/router' ; import { trigger , state , style , animate , transition } from '@angular/animations' ; import { DataService } from './services/data.service' ; import { ToastService } from './services/toast.service' ; import { AppConfig , IAppConfig } from 'config/config' ; @ Component ( { selector : 'cityvizor-app' , templateUrl : 'app.component.html' , styleUrls : [ 'app.component.scss' ] , animations : [ trigger ( "toastsFadeOut" , [ transition ( ':leave' , animate ( 250 , style ( { opacity : 0 } ) ) ) ] ) ] } ) export class AppComponent { private viewContainerRef : ViewContainerRef ; toasts : Array < any > ; constructor ( private toastService , private router , @ Inject ( AppConfig ) public config ) { this . toasts = this . toastService . toasts ; } }