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

java - How to specify maven bin in eclipse maven plugin? -

single sign on - Logging into Plone site with credentials passed through HTTP -

php - Why does AJAX not process login form? -