How to use the angular2-toaster/angular2-toaster.BodyOutputType.Component function in angular2-toaster

To help you get started, we’ve selected a few angular2-toaster examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Stabzs / Angular2-Toaster / demo / systemjs-angularquickstart-structure / app / main.ts View on Github external
popToastFromObject() {
        var toast: Toast = {
            type: 'info',
            title: 'Test Title',
            body: 'Test Body',
            onHideCallback: () => console.log(toast.title + ' was closed!')
        }
        
        var toast2: Toast = {
            type: 'success', 
            title: 'Yay',
            body: TestComponent,
            bodyOutputType: BodyOutputType.Component
        }
        
        var toast3: Toast = {
            type: 'success',
            title: 'close button',
            showCloseButton: true
        };
        
        this.toasterService.pop(toast);
        this.toasterService.pop(toast2);
        this.toasterService.pop(toast3);
    }