2
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;
});
}
どのようにメソッドを呼び出している間、テンプレート値を使用する方法を教えてください?
ジャストワウ!!!!すばらしいです – Shesha