Ng-style with condition

后端 未结 7 1572
旧巷少年郎
旧巷少年郎 2021-01-11 09:25

How can I apply style on some item in a list that satisfy listed condition:

        
7条回答
  •  一个人的身影
    2021-01-11 10:24

    You can use this method described further here. (example below)

    angular.module('app', []); 
    function myCtrl($scope){
       $scope.items = [
         { name: 'a', selected: 'false' },
         { name: 'b', selected: 'true' }
       ];
    }
    
    
      
        
    {{item.name}}

提交回复
热议问题