为什么不NG-显示删除类NG隐藏NG

2023-09-14 23:08:45 作者:你的泪容在我心里乱爬

我要显示和隐藏一个div。我通过把假值true到NG-节目

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">

值恰克但NG隐藏类住宿和导致这些div总是隐藏。我如何解决这个问题?这是为什么这样工作?我没有使用jQuery的。

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.

推荐答案

NG-显示/ NG隐藏不使用双括号

ng-show/ng-hide uses no double brackets

ng-show="drawingMods.settingRoof"