angular - CLOSED - angular2 semantic-ui dropdown fails on route change -
(first post ever .. sorry mistakes)
i have been playing around angular2 , semantic-ui dropdown. i'm losing mind since it's been 2 days , can't figure out problem.
i have component "dropdown.component" when runs ngafterviewinit calls
//////////////////// // dropdown.component //////////////////// ngafterviewinit(){ this.dom.loaddrop($(this.elementref.nativeelement).find('select')); } ngondestroy(){ //i doing .dropdown('destroy') -- although disable. //could not find nothing unbind dropdown. } //////////////////// //inside dom class //////////////////// loaddrop(elm: any) { if (typeof (elm) === 'string') { elm = $(elm); } $(document).ready(function () { elm.dropdown({ allowadditions: true }) }); }
this works perfect when reload page on first time (with 1 or multiple dropdown.component), although when access page router.navigate, routerlink or simple page dropdown.component exists, browser freeze after trying initializing first dropdown.
any ideas or guidelines?
(thanks)
finally!!
dropdown works perfectly. problem was applying pipe convert enumerables on values (for reason make fail).
each time went page containing dropdowns enum fail.
Comments
Post a Comment