import { Inject , Injectable , NgZone } from '@angular/core' ; import { TuiNotificationContentContext , TuiNotificationOptions , TuiNotificationOptionsWithData , TuiNotificationsService } from '@taiga-ui/core' ; import { Subscription } from 'rxjs' ; import { PolymorpheusContent } from '@tinkoff/ng-polymorpheus' ; @ Injectable ( { providedIn : 'root' } ) export class NotificationsService { constructor ( @ Inject ( TuiNotificationsService ) private readonly tuiNotificationsService , private readonly ngZone ) { } public show < T = undefined > ( content , options ) { return this . ngZone . run ( ( ) => this . tuiNotificationsService . show ( content , { ... options } ) . subscribe ( ) ) ; } }