Skip to content

Instantly share code, notes, and snippets.

@AlexanderKozhevin
Created May 9, 2017 09:40
Show Gist options
  • Save AlexanderKozhevin/18943b2c9c2ab82be948509cdbcb4238 to your computer and use it in GitHub Desktop.
Save AlexanderKozhevin/18943b2c9c2ab82be948509cdbcb4238 to your computer and use it in GitHub Desktop.
import {Component, ViewContainerRef} from '@angular/core';
import { ToastsManager } from 'ng2-toastr';
constructor(public toastr: ToastsManager, vRef: ViewContainerRef, private router: Router) {
this.toastr.setRootViewContainerRef(vRef);
}
runToast(){
this.toastr.warning('Angular2 toaster!');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment