Angular directive, binding click event to outside element not working
问题 I am trying to create a custom event for toggling with Angular. The directive is called toggleable. It sounds trivial at first, but tricky bit is that i want to be able to to use any button or link on the page for toggling. The code i have written is as below Directive 'use strict'; angular.module('onsComponents') .directive('togglable', function() { return { restrict: 'A', transclude: true, scope: { togglerId: '@', show: '@' }, link: function(scope, element, attrs) { if (!scope.togglerId) {