Reputation: 1013
Had this working earlier, now it doesnt respond accordingly.
In my html:
<div ng-click="setFalse();" ng-show"emptyspotslist">No results</div>
Controller:
$scope.setFalse = function () {
$scope.emptyspotslist = !$scope.emptyspotslist;
console.log($scope.emptyspotslist);
}
Default value of $scope.emptyspotslist = true. The DIV doesnt hide, after clicking. Function gets called though. Probably something really simple i'm overlooking.
Upvotes: 1
Views: 255
Reputation: 871
You should have a =
after ng-show
attribute
Old
<div ng-click="setFalse();" ng-show"emptyspotslist">No results</div>
New
<div ng-click="setFalse();" ng-show="emptyspotslist">No results</div>
Upvotes: 2
Reputation: 20073
Your HTML is malformed...
ng-show="emptyspotslist"
You're missing an equals =
.
Upvotes: 1