There was a uib-tabset along with a directive that was waiting for a change in an input within the uib-tabset. The directive was being triggered, but when it was supposed to execute a scope.$broadcast, the function was not being called.
Here is a look at the code:
<uib-tabset active="active">
<uib-tab>
<input type="file" class="upload" share-all="" accept="image/*">
The service/directive section:
.directive('shareAll', [function() {
return {
restrict: 'A',
link: function(scope, elem, attr) {
$(elem).on('change', function(event) {
return scope.$broadcast('shareIt', elem);
}
}
}
});
In the controller:
$scope.$on('shareIt', function(event, file) {
});
I came across this link (https://github.com/angular-ui/bootstrap/issues/1553) but couldn't make much sense of it, and now I'm feeling quite frustrated about this issue.
Any ideas or suggestions?