8

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.

user3074343
  • 1,091
  • 1
  • 11
  • 14
  • 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 Feb 05 '14 at 13:35

1 Answers1

32

ng-show/ng-hide uses no double brackets

ng-show="drawingMods.settingRoof"
doodeec
  • 2,927
  • 19
  • 23