I am using ui-select2 in angularjs for remote data access. I am having a drop down, based on the value chosen in dropdown the URL present in the ajax call should change dynamically , so that I can get the data from that particular URL.
Is it possible to change the URL dynamically based on the value present in the dropdown?
I've resolved this problem using function in ajax property:
ajax: {
url: function () { return '/product/' +$scope.campaign.advertiser + '/tags/'; },
...
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With