Skip to content

Instantly share code, notes, and snippets.

@rozanovz
Created March 31, 2016 12:47
Show Gist options
  • Select an option

  • Save rozanovz/b58dc8c7287af3dd63e1723ad7b815f9 to your computer and use it in GitHub Desktop.

Select an option

Save rozanovz/b58dc8c7287af3dd63e1723ad7b815f9 to your computer and use it in GitHub Desktop.
$rootScope.$on(events.OPENED, function (event, current) {
jQuery(el).find('.' + selectors.label)
.each(function (index, header) {
var ctrl = angular.element(header).scope();
if (ctrl) {
ctrl.isOpen = header === current ? !ctrl.isOpen : false;
}
});
});
$rootScope.$on(events.ELSEWHERE, function () {
jQuery(el).find('.' + selectors.label)
.each(function (index, header) {
var ctrl = angular.element(header).scope();
if (ctrl) {
ctrl.isOpen = false;
}
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment