i am fetching the data from webservice
from angularjs
and the data is coming in Json
format
here is my js file
//getzonebyid
$http.get('/zone.asmx/zone', {
params: {
log: log,
pm: pm,
id: $scope.updateparam.Id
}
})
.then(function (response) {
{
$scope.gzone = response.data.zone;
console.log(response.data.zone);
}
});
and this is my dropdownlist
<select ng-model="uzone" ng-change="locationupd(c)">
<option ng-repeat="l in gzone" value="{{l.jzone}}">{{l.jzone}}</option>
</select>
i dont have any idea why there is an extra blank space at the top of my dropdownlist, i just want my first option
to be the first value coming from my database but i am stuck with the extra space contain by my dropdown
i alson tried
$scope.uzone=$scope.gzone[0].value;
but it does not help me please guys i am stuck on this from a days now
data in Json Format {"zone":[{"jzone":"South"},{"jzone":"East"},{"jzone":"North"},{"jzone":"West"}]}