Used to inject the Notification container. If not provided, the first root component of the application is used.

The NOTIFICATION_CONTAINER can be used only with the NotificationService class.

// Import the Notification module
import { NotificationModule, NOTIFICATION_CONTAINER } from '@progress/kendo-angular-notification';

// The browser platform with a compiler
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';

import { ElementRef, NgModule } from '@angular/core';

// Import the app component
import { AppComponent } from './app.component';

// Define the app module
    declarations: [AppComponent], // declare app component
    imports:      [BrowserModule, NotificationModule], // import Notification module
    bootstrap:    [AppComponent],
    providers: [{
      useFactory: () => {
         //return the container ElementRef, where the notification will be injected
         return { nativeElement: document.body } as ElementRef;
export class AppModule {}

// Compile and launch the module

In this article

Not finding the help you need?