【发布时间】:2021-01-06 04:19:52
【问题描述】:
$scope.dis = 0;
$scope.getDiscount = function (value) {
$http.post('Pestcontrol/offer',{"code_id":value,}).then(function(response) {
// Stored the returned data into scope
$scope.dis = response.data.result;
console.log($scope.dis); //print 10 in console
});
};
{{dis}} = 0 html 中的初始结果
****我想在发布响应值后打印 {{dis}} = 10 或 html 中的任何数字****
我的 json 响应值为
code_id:“STIFF”
状态:“ok”
结果:“10”
【问题讨论】: