angularjs - Angular - ngToast clear all previous toasts and show only one -
i using angular ngtoast. trying show 1 toast @ time. displayed toast should hidden before displaying new toast.there should 1 toast @ time. tried specifying maxnumber doesn't work.
ngtoast.create({ classname: 'info', content: ' new toast', maxnumber: 1 //autodismiss: true, //maxopened: 1 //timeout: 500, //preventduplicates: true, //preventopenduplicates: true //dismissonclick:true //clicktoclose: true });
here fiddle might you: https://jsfiddle.net/774a9dq4/5/
the difference here before calling new instance of toast object, call dismiss() dismissing toast instances in dom.
ngtoast.dismiss(); ngtoast.create({ content:'i unique <3' });
Comments
Post a Comment