阅读背景:

如何设置ng禁用的内部指令

来源:互联网 

My directive has

我的指令

link: function ($scope, $elm, $attrs) {
    var status = $scope.item.status
    if (status) {
        var statusName = status.name,
            item = $scope.item;
        if (statusName === 'USED') {
            $attrs.$set('ng-disabled', true); // this doesn't work
        } else {
            $elm.attr('ng-disabled', false);
        }
    }
}
link: function ($scop



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: