I am trying to figure out a way to do an expand and collapse using angular js. I haven\'t been able to find an elegant way to do this without manipulating dom objects in the con
The problem comes in by me not knowing how to send a unique identifier with an ng-click to only expand/collapse the right content.
You can pass $event
with ng-click (ng-dblclick, and ng- mouse events), then you can determine which element caused the event:
do something
Controller:
$scope.doSomething = function(ev) {
var element = ev.srcElement ? ev.srcElement : ev.target;
console.log(element, angular.element(element))
...
}
See also http://angular-ui.github.com/bootstrap/#/accordion