This topic contains 1 reply, has 2 voices, and was last updated by Jai 1 year, 1 month ago.
toastr in Angular 5
You must be logged in to reply to this topic.
This topic contains 1 reply, has 2 voices, and was last updated by Jai 1 year, 1 month ago.
<div class=”js-comment comment__item” style=”box-sizing: border-box; word-wrap: break-word; color: #545454; font-family: ‘Helvetica Neue’, Helvetica, Arial, sans-serif;”>
<div class=”comment__body” style=”box-sizing: border-box; padding: 5px 15px;”>
<div class=”js-comment__body t-preformatted” style=”box-sizing: border-box; -webkit-font-smoothing: antialiased;”>
<p style=”box-sizing: border-box; margin: 0px 0px 16px; padding: 0px; color: #666666; font-size: 14px; line-height: 1.5;”>Hi How I can use toastr in Angular 5 ?</p>
</div>
</div>
</div>
<div class=”js-comment-new-reply comment-reply__redesign” style=”box-sizing: border-box; padding: 25px 20px; border-top: 1px solid #e1e8ed; color: #545454; font-family: ‘Helvetica Neue’, Helvetica, Arial, sans-serif;”></div>
Hi 🙂
The toastr variable should be available globally.
But in case in Angular does not recognize it, you need to declare in at the top of component.
declare let toastr:any;
And use it like this
toastr.info(‘hello’);
Thanks
You must be logged in to reply to this topic.