[英]uib-tabset killing the scope of my input change directive
如果有一個uib-tabset和一個等待uib-tabset內部輸入更改的指令,則會到達此指令但是必須觸發一個范圍。$ broadcast這不會調用該函數。
視圖
<uib-tabset active="active">
<uib-tab>
<input type="file" class="upload" share-all="" accept="image/*">
服務/指令
.directive('shareAll', [function() {
return {
restrict: 'A',
link: function(scope, elem, attr) {
$(elem).on('change', function(event) {
return scope.$broadcast('shareIt', elem);
}
}
}
});
調節器
$scope.$on('shareIt', function(event, file) {
});
我看到了這個( https://github.com/angular-ui/bootstrap/issues/1553 )但完全沒有理解,這讓我很慢。
一些想法?
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.