8
votes

I need to show and hide a div. I do it by putting true of false values into the ng-show

<div  class="drawingToolPropertie" ng-show="{{ drawingMods.settingRoof}}">


<div  class="drawingToolPropertie" ng-show="{{ drawingMods.settingObs}}">

But this is what i get:

<div id="roofPropertie" class="drawingToolPropertie ng-hide" ng-hide="true">
<div id="ObstaclePropertie" class="drawingToolPropertie ng-hide" ng-hide="false">

values chage but that ng-hide class stays and as result those divs are always hidden. How do i fix this ? Why is this working like this ? I'm not using jquery.

1
It is working as it should. ng-show is nothing more than sugar for negating ng-hide. The value of ng-hide attribute is what matters.Akash

1 Answers

32
votes

ng-show/ng-hide uses no double brackets

ng-show="drawingMods.settingRoof"