angular-toastr

Angular 2 : Loading nested Component is destroying the existing scope of ng2-toastr

江枫思渺然 提交于 2019-12-12 02:16:37
问题 I'm using a ng2-toastr in my page and working fine, but when I have a nested component in the page the existing ng2-toastr(ToastManager) scope is destroyed and toastr is not working. constructor(public toastr: ToastsManager,public vcr: ViewContainerRef) { this.toastr.setRootViewContainerRef(vcr); } In My method when I call this.toastr.warning('Its Warning','Alert'); Its Working fine, but in my html when I'm loading other component i.e <es-app></es-app> the toastr in my page is not working (No

Unable to display Toast message in Angular 5

一个人想着一个人 提交于 2019-11-29 17:31:58
Hi I am developing web application in Angular 5. I am trying to display toast message in Angular 5 using https://www.npmjs.com/package/ngx-toastr . I have downloaded required npm modules and copied css to assets folder. Also I have added import { ToastrModule } from 'ngx-toastr'; in app.component.ts. I am trying to display toast message as this.toastr.success('Hello world!', 'Toastr fun!'); When I run my solution I get below error. When I run npm install, I get below warnings, Can someone help me to figure out the issue? Any help would be appreciated. Thank you. Make sure you imported

Unable to display Toast message in Angular 5

本秂侑毒 提交于 2019-11-28 06:38:36
问题 Hi I am developing web application in Angular 5. I am trying to display toast message in Angular 5 using https://www.npmjs.com/package/ngx-toastr. I have downloaded required npm modules and copied css to assets folder. Also I have added import { ToastrModule } from 'ngx-toastr'; in app.component.ts. I am trying to display toast message as this.toastr.success('Hello world!', 'Toastr fun!'); When I run my solution I get below error. When I run npm install, I get below warnings, Can someone help