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
2
votes
2 answers

Angular JS ng-show/ hide based on drop-down list selected value

in the following code I have one drop-down list (serviceSmallId) for type of service. It is populated using model info. There is a second field check-box which should only be visible when drop-down has a selected value of 'Weekly'. I am trying to…
Max
  • 470
  • 2
  • 9
  • 22
2
votes
1 answer

Hide element depending on value json in Angularjs

I want to hide a div depending on the value I have in the json for example I have this {{product.currency}} and the value can be: £ or € if the value is equal € I want to hide this element.
user3693057
2
votes
2 answers

AngularJS - show preloader instead of ng-cloak

I have created a preloader which works fine when loading the page first time: http://vivule.ee/1 However, when navigating inside the page, the loader does not work as intended. You can see this very well when using FF. Instead of the loader it just…
yodalr
  • 9,778
  • 10
  • 32
  • 47
2
votes
2 answers

Checking size of an array

I have an array that always returns 20 items. However, if fewer than 20 items are returned, a " " is returned rather than reducing the number in the array. For example, myArray with 20 items (only 15 values). $scope.myArray = ["1", "2", "3", "4",…
Oam Psy
  • 8,555
  • 32
  • 93
  • 157
2
votes
2 answers

ng-hide not working when a custom directive with terminal option is added on the same element

My button instantiation is here: My directive code is here: (function(app) { app.directive('confirmClick', function(){ return { restrict:…
mcraenich
  • 745
  • 1
  • 14
  • 38
2
votes
3 answers

AngularJS - Hiding value based on null and empty array

I am trying to perform an ng-hide when a value is either null or an empty array (in Firebug, this appears as []). I can carry out the null via: ng-hide="myData.Address == null" However when i try: ng-hide="myData.Address == null || myData.Address…
Oam Psy
  • 8,555
  • 32
  • 93
  • 157
2
votes
2 answers

AngularJS - Show/hide based on number of items in an ng-repeat

I have an ng-repeat with 2 filters:
{{ addresses.name }} {{ addresses.number }} {{…
Oam Psy
  • 8,555
  • 32
  • 93
  • 157
2
votes
2 answers

ngShow doesn't add ng-show class

I'm trying to create an animation for an element that is initially hidden by a ng-show="boolDefaultIsFalse" attribute. When I trigger the boolean to be true then the element is shown, but the animation doesn't play. This is because the element never…
Vivendi
  • 20,047
  • 25
  • 121
  • 196
2
votes
0 answers

Using ngShow\ngHide in Angular 1.2+

We've recently moved to the latest stable version of Angular (1.2.19 at the time of writing) coming from 1.0.8. They fixed a rather nasty bug regarding isolated scopes, alas one we were (unknowingly) exploiting. I've managed to fix our application,…
thomaux
  • 19,133
  • 10
  • 76
  • 103
1
vote
1 answer

How do I hide a choice field if there are no options in it

I have two dynamic select fields. The first choice field is loaded from a list and dependant on what you select it then populates the second select field. I'm have a problem where I want to hide the second select field if it doesn't have any option…
Al Roome
  • 15
  • 3
1
vote
2 answers

ng-hide does not hide button

I want to hide the button if it's the delete folder and show if it's the inbox. The code below does not work as the button is always shown.
1
vote
1 answer

AngularJS directives can't check for null

I am retrieving numbers (integer or float) from a MySQL database, and putting them in a form. I want a checkbox to be visible if the value is not null. However, ng-show and other directives don't seem able to check for null. Ideally, I want:
Gary31
  • 11
  • 1
1
vote
0 answers

Ionic hide footer on one view

I am trying to hide the footer on only one of my ionic views, no matter what I try I cannot seem to get this to work. Any ideas? I have tried using ng-hide and did not work. I can't seem to work out what the issue is. I will attach the code for the…
Curtis Boylan
  • 827
  • 1
  • 7
  • 23
1
vote
1 answer

ng-hide / ng-show not working from function called with ng-click

I have two screens to be showing up in one area and I am using ng-hide / ng-show for the same !! My code is : inside controller $scope.grid1show = 'true' // intially this grid will shown on page load $scope.grid2show = 'false' // Intially…
CodeWithCoffee
  • 1,896
  • 2
  • 14
  • 36
1
vote
1 answer

ng-show and ng-hide not working as expected

I have conflicting ng-show and ng-hides in my code to show only one or the other in a simple form. 1) However I have seen that the ng-show, ng-hide does not seem to be evaluated when the form loads and both conflicting items are shown. 2) After I do…
1 2
3
14 15