Dropdown not working in some android device
Build application using angular + ionic in some android device (i.e android version 4.2.2 or below)
Below ionic html code not functioning properly on some android device:
Red
Below ionic html code not functioning properly on some android device:
class="list">
To overcome this issue below steps follow:
Step1: Create JSON
var fruitArrayJson = '[{"text":"Mango","value":"Mango"},{"text":"Apple","value":"Apple"}]';
Steps2: Respected Controller on page load call this JSON data
$scope.collectObj = {};
$scope.fruitJson = JSON.parse(fruitArreyJson);
Steps3: This scope data bind with DOM.
* ng-init : when page loaded default drop down shown first data as selected.
* ng-options : fruit (variable) in fruitJson (array) drop down shows " text " property of fruit object.
Comments
Post a Comment