I need to hide and show a textbox based on the value selected in the drop-down.
This is already done in Angular 1, but how to do it in Angular 4.
<div ng-app ng-controller="Controller">
<select ng-model="myDropDown">
<option value="one">One</option>
<option value="two">Two</option>
<option value="three">Three</option>
</select>
<input ng-show="myDropDown=='two'" type="text">
</div>
function Controller ($scope) {
$scope.myDropDown = 'one';
}
Fiddle in Angular 1
Copyright Notice:Content Author:「SmartestVEGA」,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/50679774/angular-4-ng-show