i am creating a web app in which i have two dropdownlist
<tr style="width:80%; border:1px solid black;">
<td style="text-align:center; width:50%;">
Comname
</td>
<td style="width:50%; border:1px solid black; padding:3px; text-align:center;">
<select ng-change="gbrandname()" ng-init="ucomname='comname'" ng-model="ucomname">
<option ng-repeat="o in comnamelistfun" value="comname">{{o.comname}}</option>
</select>
</td>
</tr>
<tr style="width:80%; border:1px solid black;">
<td style="text-align:center; width:50%;">
Brand Name
</td>
<td style="width:50%; border:1px solid black; padding:3px; text-align:center;">
<select ng-change="getzone()" ng-init="ubrandname='select'" ng-model="ubrandname">
<option ng-repeat="o in gbrand" value="brandname">{{o.brandname}}</option>
</select>
</td>
</tr>
on comname change i want to call the data from my database as per the selected company of my first dropdownlist
here is my function
//brandname
$scope.gbrandname = function () {
$http.get('/csuv5.asmx/getbrand', {
params: {
log: 'admin',
comname: 'QED Productions Pvt Ltd',
pm: 'admin'
}
})
.then(function (response) {
{
$scope.gbrand = response.data.brandname;
console.log(response.data.branname);
}
});
}
i pass those parameters in my function and print it but it is not showing me any data on my second dropdownlist
but when i pass static parameters in my function its working
this is my function with static parameter, this is working fine
//brandname
//$scope.gbrandname = function () {
$http.get('/csuv5.asmx/getbrand', {
params: {
log: 'admin',
comname: 'QED Productions Pvt Ltd',
pm: 'admin'
}
})
.then(function (response) {
{
$scope.gbrand = response.data.brandname;
console.log(response.data.branname);
}
});
//}
and even ng-click also working
what is wrong with ng-change?