Ng-style with condition

后端 未结 7 1496
旧巷少年郎
旧巷少年郎 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:14

    Please refer below

    function simpleController($scope) {
        $scope.items = [
    
        {
            selected: false,
            name: 'first'
        }
    ,
           {
            selected: true,
            name: 'second'
        }
        ];
    }
    .red
    {
    background:red}
    
    
        
        
          
    {{item.name}}

提交回复
热议问题