NG-show based on select list
NickName:ajmajmajma Ask DateTime:2014-08-21T04:17:22

NG-show based on select list

I am trying to get items to only show up if something is selected in a select list. I am trying something like this

<input ng-show="myDropDown==''" type="text">

I basically want logic saying if the drop down has anything selected, show this ^. I found that example for specifying the option selected, however I would just like do say if anything is selected show, and if nothing has been selected, hide.

There is a catch, however, these drop downs will be re-generated with $http based on other clicks, and it would be ideal if this was done that the text would hide. Any ideas? Thanks!

Copyright Notice:Content Author:「ajmajmajma」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/25413678/ng-show-based-on-select-list

More about “NG-show based on select list” related questions

NG-show based on select list

I am trying to get items to only show up if something is selected in a select list. I am trying something like this &lt;input ng-show="myDropDown==''" type="text"&gt; I basically want logic sayi...

Show Detail

NG-Show based upon refering URL

Can I use NG-Show to display a button based upon the internal page the user came from. For example: We have 3 pages: Home, About, Middle Man. Two buttons: Back to Home, Back to About. On the Mid...

Show Detail

ng-show not working with <select>

I am trying to hide or display a &lt;select&gt; tag based on the array reference being [] or not. The &lt;select&gt; tag is backed by the same array. &lt;select ng-show="model.people" ng-model="mo...

Show Detail

ng-show based on dynamic conditions from database

We are working on some dynamic form where user can create questions in the admin panel and put conditions to show them based on other questions values. ng-show="((UserCode==10003 &amp;&amp; Name=='

Show Detail

Binding ng-show to a select option in AngularJS

It's fairly straightforward. You can easily give show/hide functionality to pretty much any element using ng-show="myModelName". In the official documentation they achieve this using a checkbox.

Show Detail

angular ng-show expressions string evaluating not working as expected

I am trying to a list elements based on a selection with ng-repeat and ng-show, i cant understand why ng-show is not working as expected. function Ctrl($scope) { $scope.categories = [ {"name": "a...

Show Detail

Show and hide different contents with angularjs ng-show / ng-hide

I am new with angularjs and struggling to make some logic for Showing and hiding different Div's using ng-show and ng-hide based on different click. PLUNKER View 1: &lt;div ng-hide="section1"&g...

Show Detail

ng-show is not working with list in Angularjs

I am trying to use ng-show="emp" with a checkbox bind it with ng-model inside a list but it is not working properly. Do you have any idea how it works? HTML &lt;fieldset id="field4"&gt; ...

Show Detail

Angular ng-switch with ng-show not respecting DOM order

I'm coming to Angular from a jQuery / Backbone background so I'm new to Angular. Anyway, so I'm trying to show/hide divs based on select box values. Basic stuff I know. The problem is that with the

Show Detail

ng-show ng-hide based on $scope variable not working properly

I want to show and hide based on $rootScope variable. I am taking a variable in scope and assigned it true in all functions and all are in same controller, based on that I ng-show..but its not hiding

Show Detail