我的代碼是這樣的
$http.post("../services/myurl.aspx?Param=" + finaldata, '', { 'Content-type': 'text' })
.success(function (pricedata) {
alert (success)
})
.error(function() {
alert('we have failed to make a connection with the server. Please try after some time');
});
當我做這個呼叫成功,也沒有錯誤既不happens.But服務被調用。我有點困惑。任何人都可以指出我做錯了什麼?
你有什麼錯誤?請檢查瀏覽器控制檯錯誤? – 2014-10-20 07:44:14
你可能想在'alert'中引用'success'的引號。 – 2014-10-20 07:47:50