angularjs - How to add an angularui accordion-group dynamically -


in angularjs service, adding html accordion-group dom of accordion element. results display of accordion-group if panel - no title bar, no collapse behavior.

i'm sure because accordion gets initialized before content added. jqueryui accordion has refresh method such occasions, not sure how angualrui accordion recognize new accordion group.

hope following steps :

  1. get reference of element want add accordion

    html : <div id = "myaccordion"> </div>

    controller : var parent = angular.element("#myaccordion");

  2. compile accordion template , attach parent

    controller: var accordion = $compile("<div accordion> </div>")($scope); parent.append(accordion);

but work around should ideally have directive dom manipulation , perhaps coding jquery in mind.


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -