Questions tagged [ng-hide]

The ngHide directive shows or hides the given HTML element based on the expression provided to the ngHide attribute. The element is shown or hidden by removing or adding the ng-hide CSS class onto the element. The .ng-hide CSS class is predefined in AngularJS and sets the display style to none (using an !important flag).

The ngHide directive shows or hides the given HTML element based on the expression provided to the ngHide attribute. The element is shown or hidden by removing or adding the ng-hide CSS class onto the element. The .ng-hide CSS class is predefined in and sets the display style to none (using an !important flag).

See the AngularJS documentation for more information.

216 questions
3
votes
3 answers

AngularJS - Using indexOf inside ng-repeat to show/hide values

I have a JSON file that contains a bunch of data: myData.JSON: { "Addresses": { "AddressList": [ { "HouseNumber": 201, "Street": "Victoria Lane", "Postcode": "SW1 8ES" }, { …
Oam Psy
  • 8,555
  • 32
  • 93
  • 157
3
votes
1 answer

AngularJS: How do I hide clicked element in angular?

I'm totally new to angular and I'm finding that doing simple things aren't as obvious to me? I have a list of items that I display using ng-repeat. I simply want to hide the element once I click on an element within that scope. I'd like to do it the…
2
votes
1 answer

Angular. How to hide data in the title attribute of the image if the object value is null?

I understand ng-show/ng-hide can be used but this case is a little different. This is my script below. Basically what I'm trying to do is hide the word "PEAK" if 'info.peak' value is empty in the title tag. DO I need to create two versions of this…
2
votes
2 answers

ng-repeat hide rows with empty object

I have a table where I am repeating over an array of objects. Within the object, there is a nested object, like so: [ {"Object1": {"Sub_obj" : {} } }, {"Object2": {"Sub_obj" : {"Name" :…
Nishant Roy
  • 1,043
  • 4
  • 16
  • 35
2
votes
5 answers

ng-hide is not working

I am new to angularjs. When I click on "Click Me" the toggle method is called. The value of test changes from false to true, but ng-hide is not acknowledging the new value of test.
VivekT
  • 81
  • 2
  • 13
2
votes
1 answer

Angular ng-click works only once

I need to switch between to div's. Div class="wrapper" must be visible by default. Div class="form" must be shown after admin approve. The problem is when i click on it works only once, and no reaction after. If i will add…
Serhio g. Lazin
  • 9,442
  • 6
  • 25
  • 33
2
votes
3 answers

Angular - ng-hide with localStorage doesn't work

I have in my HTML :
Test
And in my controller : $scope.token = localStorage.key; But it always return false (?) - it doesn't work. And if I try to do it like this :
Test
And in…
Moti Winkler
  • 308
  • 1
  • 4
  • 19
2
votes
3 answers

Nested ng-click inside of ng-repeat affecting ALL forms instead of one

I've been looking a bit around here on similar issues but can't seem to get my issue working. I just want one of the "products" "edit-forms" to pop up when I click "edit." I get why it's opening all of them up, but I'm not sure how to fix it. …
2
votes
1 answer

How to avoid the hidden classes using selenium webdriver

I am trying to refer to a class using classname with selenium but the same class got a hidden tag with exactly same name and all other values except ng-show=false AS below: ul class="nav nav-pills nav-stacked ng-hide" ng-show="false"
ul…
2
votes
1 answer

In AngularJS's ngShow or ngHide, or conditional, what happens when a property doesn't exist? (such as for a.b.c.d or !a.b.c.d)

Let's say in the condition of AngularJS's ngShow, what if a property doesn't exist? For example, if vm.foo is 1, then what if in the HTML, there is a
hello
and what if it is
nonopolarity
  • 146,324
  • 131
  • 460
  • 740
2
votes
4 answers

ng-show / ng-hide / ng-if don't work on Angular directive

I'm building a directive that takes the form of a card. When I load the card template I want to ensure that the card is hidden if a user has previously hid the card. I can track this via the request.hide attribute. Here is my directive…
Daniel Bonnell
  • 4,817
  • 9
  • 48
  • 88
2
votes
1 answer

hide a child element on mouseout of parent DIV - AngularJs

HTML -
sajalsuraj
  • 922
  • 15
  • 29
2
votes
1 answer

How to render maps within ng-hide divs using ngMap without getting a gray rectangle

The problem: Google Maps elements that are within divs that are initially rendered as ng-hidden come up as gray rectangles when they are ng-shown. I've put together this Plunker to demonstrate: https://plnkr.co/edit/emzlIT?p=preview Others have had…
jamesthe500
  • 341
  • 1
  • 7
  • 10
2
votes
2 answers

Angularjs - unable to show/hide element according to scroll location

I'm trying to show an arrow icon to be used as "go to top" button, but only after some scrolling done by the user. The code used to work great using jquery, but I'm having hard time to achieve the same effect using angular. At the moment, the arrow…
Alex
  • 1,982
  • 4
  • 37
  • 70
2
votes
2 answers

How can I hide certain contents of index.html page in an angular ng-view?

I was wondering whether I can hide certain sections on the index.html file when I access a view in angularjs. My index.html file contains a bottom menu bar on all the views and I have created a home.html view where I don't want to include that menu…
Ken Ryan
  • 539
  • 1
  • 10
  • 31
1
2
3
14 15