I have a dropdownlist and I need to hide one option based on the condition
Mycode is something like below :
$scope.sqs.qs6_PropertyType.answer = _.findWhere($scope.propertyType, { id: '2' });
// this is to set the selected value to 2
I need to Hide the option with value=”2″ I have written something like below:
$("#qs6_PropertyType").children('option[value="2"]').hide();
I have tried like below as well but its not working
//var qs6obj = angular.element(document.querySelector('#qs6_PropertyType'))
//qs6obj.childElement.remove('option[id="2"]');
Source: AngularJS
from Angular Questions https://angularquestions.com/2017/10/13/how-to-hide-the-option-in-dropdownlist-in-angular-js/
via @lzomedia #developer #freelance #web #lzomedia.com
No comments:
Post a Comment