嘗試使用$ http.get()方法,並傳遞多個參數implemnt在角JS REST調用,但它拋出 錯誤如何通過在角JS多個參數REST調用
var app = angular.module('angularjs-starter', []);
app.controller('MainCtrl', function ($scope, $http) {
$http.get("https://api.nexmo.com/verify/json?api_key=56a9bn1af&api_secret=d3n0de241&number=919690286358&brand=stayuncle");
});
錯誤是:
org.xml.sax.SAXParseException; lineNumber: 364; columnNumber: 85; The reference to entity "api_secret" must end with the ';' delimiter.
任何可能的解決辦法?
你應該把它作爲一個對象,它stringfy。 –
@Rohit你好你能改變我的代碼嗎? – nand