如何使用AJAX动态更改URL中选择二? [英] How to dynamically change the URL in Select2 using AJAX?
本文介绍了如何使用AJAX动态更改URL中选择二?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我使用的用户界面,选择2在angularjs进行远程数据访问。 我有一个下拉菜单,根据所选的下拉列表中的值的URL present在Ajax调用应该动态地改变,这样我可以从特定的URL获取数据。
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.
是否可以动态地基于价值present在下拉菜单中更改URL?
Is it possible to change the URL dynamically based on the value present in the dropdown?
推荐答案
我已经解决了AJAX物业使用功能这个问题:
I've resolved this problem using function in ajax property:
ajax: {
url: function () { return '/product/' +$scope.campaign.advertiser + '/tags/'; },
...
}
这篇关于如何使用AJAX动态更改URL中选择二?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文