Questions tagged [ng-show]

The ngShow directive shows or hides the given HTML element based on the expression provided to the ngShow 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 ngShow directive shows or hides the given HTML element based on the expression provided to the ngShow 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). For CSP mode please add angular-csp.css to your html file (see ngCsp).

See the AngularJS documentation for more information.

527 questions
11
votes
2 answers

div with ng-show not updating after ajax call

Very new to angular; I'm sure I'm missing something really obvious. I have a login form on my page. What I want to happen is to have the form hide after the user successfully logs in. My entire page uses a single controller. Here's the HTML; I've…
EmmyS
  • 11,892
  • 48
  • 101
  • 156
11
votes
3 answers

AngularJS ng-show animation cross-fade inside ng-repeat

Simple (but not for me!) angularjs show/hide animation problem. I have searched high and low but not found the solution to this specific problem, which can perhaps be best explained with an example and a "challenge". First, the example:…
Adam Montanaro
  • 113
  • 1
  • 1
  • 4
10
votes
2 answers

How can I use ng-hide if $location.url == base (root) url?

I'd like a ← Back to home link to appear below the nagivation on every page of my Angular app except the home page. So I'd like to conditionally add the link and hide it using ng-hide if the url is already on the home page (view) of the app. I've…
Tyler Youngblood
  • 2,710
  • 3
  • 18
  • 24
9
votes
1 answer

AngularJS filter based on array of strings?

I'm having a hard time wrapping my head around how to go about doing an Angular filter to solve a problem that I'm running into. Here's a basic example of my data structure, an array of tasks: var tasks = [ { Title: "This is a task title", …
user2275203
8
votes
3 answers

Set required attribute for an input element if it's not hidden

I'm working on a dynamic form using angular.js. Inputs field
If condition() returns false, the input field won't be shown. But by clicking on a submit button, I'll…
Artisan72
  • 3,052
  • 3
  • 23
  • 30
8
votes
2 answers

Animate.css and Angularjs ng-hide

I am learning and experimenting with Angularjs and animate.css. I am trying to add animations when the ng-show is true or false. The showing and hiding works but not the animations. Hope someone here can show me what I am doing wrong. Here is the…
Miguel-.o
  • 178
  • 1
  • 4
  • 12
8
votes
2 answers

Angularjs: How to scroll the page after ng-show shows hidden elements?

I have a list of hidden items. I need to show the list and then scroll to one of them with a single click. I reproduced the code here: http://plnkr.co/edit/kp5dJZFYU3tZS6DiQUKz?p=preview As I see in the console, scrollTop() is called before the…
macene
  • 85
  • 1
  • 1
  • 3
7
votes
3 answers
7
votes
2 answers

How to decrease watchers inside AngularJS for ng-show with same condition

In my HTML code, some div will display with the same condition. I set this condition to ng-show for each div.
...data1...
...something else...
...data2...
...something…
Le Thanh
  • 227
  • 4
  • 10
7
votes
1 answer

make an element with ng-if start hidden (prevent it from showing during page load)

When i want to make something start as hidden with ng-show you can just add class="ng-hide" so the css will hide the element beforehand. This way an element won't be shown when the page is still loading I want to do the same thing using ng-if but i…
valepu
  • 3,136
  • 7
  • 36
  • 67
6
votes
4 answers

Using angular to hide a whole div from within an inner loop?

Above is the code I have right now. I want it so that when you click one of the buttons…
sleepycow
  • 159
  • 1
  • 12
6
votes
1 answer

Angularjs ng-show directive interprets the 'N' and 'NO' as falsy values

It seems that Angularjs ng-show directive interprets the 'N' and 'NO' as falsy values. In my angular application, I'm displaying data related to a specific country using the following
some code
I was surprised…
med
  • 323
  • 4
  • 11
5
votes
3 answers

Angular scope and ng-click / ng-show to set multiple divs

I am looking for some help with my code I have so far. The main objective is to be able to click on any Plus icon and have it place a cover over all other div blocks. And when a plus icon is clicked it will also show a div block to the right. …
AngularJR
  • 2,752
  • 2
  • 16
  • 19
5
votes
3 answers

Slide Transition with ng-show in IONIC

Here is the codepen http://codepen.io/lakhan/pen/cukyL I have a list of Items with ng-repeat and I am showing one item at a time. on clicking next showing the next item from the list. Now what I want to achieve is slide transition on Item when I am…
Bindas
  • 980
  • 2
  • 8
  • 22
4
votes
3 answers

How to create nested structure with ng-repeat in AngularJS

Issue with ng-repeat, AngularJS looping I'm having trouble creating this loop structure using ng-repeat in angular js(ionic 1 app). When I use ng-repeat, the date is repeatedly shown along with each event in every loop. But I want to show the date…
Ronald Babu
  • 166
  • 1
  • 7
1
2
3
35 36