NG-Show

hide/show input box

by gogirl

HTML

<div ng-app ng-controller="Controller">
    <select ng-model="myDropDown">
          <option value="one">Show</option>
          <option value="two">Hide</option>
          <option value="other">Other</option>
    </select>
    <div ng-show="myDropDown=='one'" >Choose Hide and I am gone</div>
    <input ng-show="myDropDown=='other'" type="text">
</div>

JavaScript

function Controller ($scope) {
    $scope.myDropDown = 'one';
}