Questions tagged [angularjs-ng-show]

The ngShow directive shows or hides the given HTML element based on the expression provided to the ngShow attribute.

From Angularjs documentation:

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).

171 questions
1
vote
1 answer

Angularjs: ng-show not showing after set to true

In my controller.js I tried to: $scope.isVisible = false; myService.callMe().success(function (response) { $scope.isVisible = true; …
Zerosero
  • 323
  • 3
  • 15
1
vote
1 answer

How do I get the ng-show to work inside an AngularJS directive?

I'm having trouble getting ng-show to work inside my directive template. I'm using AngularJS 1.6.4. The Chrome debugger shows the successful change from ng-show="true" to ng-show="false" in the final DOM. But the element stays hidden when set to…
Carlo Bos
  • 3,105
  • 2
  • 16
  • 29
1
vote
1 answer

ng-click doesn't work once ng-show div is moved out of overall div

I have a ng-click that shows/hides another section, which is all within the same overall div. I want to move the show/hide section to its own div, but when do this, the ng-click no longer works. My current code that works looks like this:
Dave
  • 1,257
  • 2
  • 27
  • 58
1
vote
3 answers

ng-show does not evaluate expression

I am new to Angularjs and practicing it by doing some tasks. Here I am creating an object in controller and the object values in my web page. But here the ng-show does not evaluate the below expression. But if I create a variable in controller as…
User12345
  • 486
  • 1
  • 3
  • 18
1
vote
1 answer

AngularJS recursive template close by default all nodes and expand them with ng-click

is it possible with this example from Ben Foster to get all nodes closed by default (at the loading of the page) ? and to open each node with ng-click ? http://jsfiddle.net/benfosterdev/NP7P5/ I have found a way to get selected node but I don't know…
1
vote
2 answers

Hide previous content on second click of the button of any loop inside ng repeat

I have a ng-show inside ng repeat. Whenever i click the comment button it shows the div tag contains comment box which shows previous comments of that list. The actual problem is when i click one comment button, it shows comment box with contents…
1
vote
3 answers

AngularJs ng-show usage

I am new on AngularJs and I want to see header when only checkbox value is true. I set its initial value false but header is showing in first running. My question is why header is showing in first time without any click? var app =…
Pronto
  • 179
  • 1
  • 2
  • 11
1
vote
1 answer

Must not display more when I get data from database

I get the number of news from the database, but for example when I max limit of news such that I receive 24 news in total, then the tag "download more news"¨ Everything plays as it should, but it must just get away such that one can not "download…
1
vote
3 answers

using ng repeat mouseover ng show

Hi i am displaying a user list using ng repeat. what i want is when i hover over the user buttons will appear.. and after i leave it will disappear i tried this pls .. with this code after i hoveer it show icons for whole list HTML
1
vote
1 answer

Ion Navigation Button cannot control Div ng-show

Currently I facing the problem in showing div once I click on the ion-nav-buttons. Below is the coding.
1
vote
3 answers

Show a div with AngularJS

I am searching how to show a div with AngularJS. I read some topic on StackOverflow but when I try to apply them, it doesn't works for my case... This is my HTML code :
1
vote
3 answers

How to ng-show some html content base on the current route?

I have a single page with angular and the content look like this: And when I click on some tab, for example "Servicios", the services content is shown under the tabs. Here is the respective code:
Kimy BF
  • 1,029
  • 3
  • 13
  • 23
1
vote
3 answers

Hide element if condition is true

I have a directive which should allow me to change a specific mode, updating the scope as well. This works fine. The issue I'm facing now is that I need to be able to hide the element for the current mode. I'll explain it better: I have modes…
Nick
  • 13,493
  • 8
  • 51
  • 98
1
vote
3 answers

bind different value to ng-model on some condition

I have started using Angular and don't have much experience in it. I am stuck with an issue. I am using ng-show and ng-model. its like I am pre-populating…
jammer
  • 151
  • 3
  • 23
1
vote
3 answers

Change ng-show value in other controller

I'm trying to show and hide a div using ng-show. It's a navbar that I want to show only in some views. I have a controller which "controls" that div. And in other controller I want to edit this ng-show value in order to hide or show the div…