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

How can I show the 'No Books Found' row if null value is returned in filter?

I am trying to show a 'No Books Found!' row if angular filter returns no result in AngularJs. But I cannot somehow make it to work. Here is my html code:
John Roca
  • 1,204
  • 1
  • 14
  • 27
1
vote
1 answer

HIde and show images with ng-repeat and ng-show and ng-hide and ng-click based on index

I have 2 columns, first column is Unselected images and button called Select picture next to it and second column is selected images and button called Remove picture. if i click Select picture button for one image at left column, it should move to…
1
vote
2 answers

Angular ng-show how to make visible

Working on a simple contact form where I need to show an error message if the $scope is undefined. The validation part works however I can't remember how to enable the view of the message under ng-show in the html side. HTML:

Warve
  • 481
  • 1
  • 8
  • 22
1
vote
0 answers

ng-show doesn't work on routescope variable

Could someone explain this strange angularjs behaviour CODE HTML {{$root.commandsHide}} OPTPUT contains: "My Button" and true Thanks in advance
1
vote
3 answers

How do I use angular or javascript to display value in html based on true/false return?

Note: The code below is just logic, so no parameters are defined. Although they are defined and being used actively in the same javascript file i'm in. I'm new to javascript/angularjs (I don't even know what code this is) and as of now it's really…
1
vote
1 answer

AngularJS ng-if does not work

In the controller, I have this var onComplete = function(response) { $scope.reportList = response.data; $log.info($scope.reportList); }; In the HTML, reportList is a JSON like this {packageType=1,…
1
vote
2 answers

AngularJS - get DB data(in js) / use ng-show(in html)

I am trying to get date from my db. And with the data I wanna use ng-show. In my js file : httpq.post('/data/instructor.asmx/PasswordAgain', postData) .then(function(data) { $scope.informs = JSON.parse(data.d.result).Table; …
Gorden
  • 65
  • 1
  • 6
1
vote
1 answer

$scope not updating on change

I'm using Satellizer for authentication, after I login, the login/register button in the header should change to logout but they don't. Here is my header directive: angular.module('pages.components.navHeader', [ …
denislexic
  • 10,786
  • 23
  • 84
  • 128
1
vote
2 answers

Using $rootscope to change ng-show between controllers

What I want to do is pretty simple. I have two forms. One form is visible in the beginning and once that form is submitted it dissappears and the second form appears. I am trying to use a flag variable set at $rootscope.showFlag but it doesn't seem…
madu
  • 5,232
  • 14
  • 56
  • 96
1
vote
0 answers

Replace HTML block by another one with Angular JS

I am trying to build an Angular JS app where a certain block of HTML is replaced by another one (both are input forms) and they should both be in the same location. I have used ng-show/hide and it works with regards to the hiding/showing. The only…
1
vote
2 answers

angularjs ng-show: show menu after successful login

I'm trying to show the navigation bar once the user logs in successfully. but the navigation-bar is still hidden even after the user logs in. here is a part of the index.html
AtefB
  • 171
  • 1
  • 3
  • 16
1
vote
1 answer

ng-hide ng-show not working as it should

I am building a quiz in angular and Im trying to show a button based on whether the quiz has started. User go to their users page when logged in, and when they havent started the quiz i want to show the "start quiz" button. During the quiz they can…
idontknow
  • 966
  • 8
  • 21
1
vote
1 answer

Angularjs ng-show from child scope to parent scope not refreshing

I haven't found, despite the many similar questions, how to hide a DOM element with ng-show in a parent scope from a child scope. I've got two nested controllers. In the parent one (attached to ), I'm using the youtube embed directive to be able to…
1
vote
2 answers

AngularJS - ngShow is not working

My view is written as follows:
1
vote
1 answer

Angular ng-show from variable set on scope of directive in link function

I would like to be able to set ng-show off a variable I set on the scope variable within the link function of an Angular customer directive. angular.module('myApp') .directive('testDir', function () { return { template:
honkskillet
  • 3,007
  • 6
  • 31
  • 47