为什么不NG-显示删除类NG隐藏 [英] why doesn't ng-show remove class ng-hide

查看:136
本文介绍了为什么不NG-显示删除类NG隐藏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要显示和隐藏一个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"

这篇关于为什么不NG-显示删除类NG隐藏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆