Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

How to hide div based on select the dropdown in angular js

var app = angular.module('myApp', []);
app.controller('myCtrl', function ($scope) {
    // $scope.showInput = true;
    // $scope.getOption = function (value) {
    //     if (value.studentType == "angularjs") {
    //         $scope.showInput = false;
    //     }
    // };
});
Comment

How to hide div based on select the dropdown in angular js

<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.9/angular.min.js"></script>
<div ng-app="myApp" ng-controller="myCtrl">
    <div>
        <p>Course Type</p>
        <div>
            <select name="student-type" id="student-type" class="icon-select-down" ng-model="studentType"
                ng-change="getOption(this)">
                <option value="java" selected>Java</option>
                <option value="angularjs">Angular js</option>
                <option value="reactJs">React js</option>
            </select>
        </div>
    </div>

    <div ng-if="showInput">
        <p>Attendence Days</p>
        <div class="slice-item">
            <input type="text" class="input input-text" ng-model="attendenceDays" required validate-on="blur"
                ng-pattern="/^([1-9]|10)$/" invalid-message="'You must enter number between 1 to 25'" />
        </div>
    </div>
</div>
Comment

PREVIOUS NEXT
Code Example
Javascript :: AngularJS Form validation transition to valid when some elements are not even touched yet 
Javascript :: inserting new value to an array of object in typescript 
Javascript :: Angular Nx Nrwl - Cannot parse tsconfig.base.json: PropertyNameExpected in JSON when try to create a new lib 
Javascript :: Conditional navigation inside Tabs 
Javascript :: react-native navigation stack set push component then cover parent page 
Javascript :: Delete a field from Firebase Firestore where the field/key has a period/punctuation (".") - modular v9 JavaScript SDK 
Javascript :: In React Native / Expo, is there any way to save a specific part of an image 
Javascript :: How to use search/filter for HTML Divs generated from JSON data using JavaScript 
Javascript :: coin gecko api 
Javascript :: I have a dataframe with a json substring in 1 of the columns. i want to extract variables and make columns for them 
Javascript :: vue custom event validation 
Javascript :: Connect session middleware - regenerate vs reload 
Javascript :: get copied text javascript 
Javascript :: No enum constant datepicker react native 
Javascript :: Variables In Self Invoking Function 
Javascript :: chat v2 msg and time good 
Javascript :: phaser seeded group 
Javascript :: What is an array? Is it static or dynamic in Javascript 
Javascript :: how to add random color in chart in react j 
Javascript :: ip scanner node 
Javascript :: react console logs not working 
Javascript :: detect sound chrome extension every 1 second 
Javascript :: 1--Reverse Bits Algo 
Javascript :: react users list modal 
Javascript :: fs.writefile example in aws lambda 
Javascript :: use spread operator in max method javascript 
Javascript :: In express redirect user to external url 
Javascript :: how to add picture to picture video js in old library in js 
Javascript :: decode jwt token in angular 
Javascript :: regexp object 
ADD CONTENT
Topic
Content
Source link
Name
3+2 =