【发布时间】:2016-09-30 15:08:51
【问题描述】:
HTML:
<li data-id="{{Name.first}}" ng-click="getNames('{{Name.first}}')">
脚本:
$scope.getNames = function(name) { // I am getting "{{Name.first}}" which I sent. I am not getting the template value
$http({
method : "POST",
url : "/some/url",
params: { value: id },
headers: {
'Content-type': 'application/json'
}
}).then(function mySucces(response) {
$scope.Results = response.data;
});
}
请告诉我在调用方法时如何使用模板值?
【问题讨论】:
标签: jquery html angularjs ajax templates