How to show glyphicon eye based on value in Angularjs?

前端 未结 3 413
悲&欢浪女
悲&欢浪女 2021-01-29 07:20

I have glyphicon-eye for all fields in the form. If user click on glyphicon-eye-open then it will change to glyphicon-eye-close and I push that specific field name into an array

3条回答
  •  走了就别回头了
    2021-01-29 08:07

    You can use ng-class like below.

    function myCtrl($scope) {
        $scope.allow=[{
          'fname':1,
          'name':'Anil'
        },{
          'fname':0,
          'name':'Sunil'
        },{
          'fname':1,
          'name':'Manil'
        }]
    }
    
    
    
    

提交回复
热议问题