How to set ng-disabled inside directive

后端 未结 3 1496
栀梦
栀梦 2020-12-18 22:46

My directive has

link: function ($scope, $elm, $attrs) {
    var status = $scope.item.status
    if (status) {
        var statusName = status.name,
                 


        
3条回答
  •  别那么骄傲
    2020-12-18 23:05

    You would set ng-disabled to a scope variable, ex:

    
    

    And then inside your directive you can set that variable:

    $scope.isDisabled = true;
    

提交回复
热议问题