我想隐藏这个div:
<div class="desc" ng-show="desc">
并显示此div
<div class="lists"ng-show="lists"
ng-repeat="x in todoWork | orderBy:['todoPriority', 'todoTime']"
ng-class="{strike:x.done}">
关于ng-blur指令。
我试过了,但是,
$scope.myFunc1 = function() {
if($scope.myForm1.description.$dirty && $scope.myForm1.datetime.$dirty && $scope.myForm1.priority.$dirty==true){
$scope.lists =true;
$scope.desc=false;
}
};
但只有第一个正在执行。即使尝试为第二个函数编写另一个函数,问题仍然存在。
答案 0 :(得分:1)
如果您想隐藏第一个并显示第二个,那么为什么不使用如下所示的单个变量:
第一个<div ng-show="desc">
第二个<div ng-show="!desc">