Update clickoutside.directive.js
Update clickoutside.directive.js

Helpful for automatic unique ID generation, you can use one time binding inside dropdown directive to handle all ids

eq.
directive
    .directive('dropdown', function() {
        var uniqueId = 1;
    return {
        restrict: 'E',
        link: function(scope, element, attrs) {
            scope.uniqueId = 'hsSelect' + uniqueId++;
            scoep.close = function(){...}
        }
    };
});

and then in template:

id="{{::uniqueId}}" click-outside="close()"

without timeout directive gets empty id
marcin-wosinek/angular-click-outside,marcin-wosinek/angular-click-outside,IamAdamJowett/angular-click-outside,IamAdamJowett/angular-click-outside