我已經使用了,然後,抓住我的Ajax調用:角度捕捉關鍵字錯誤
try {
ServiceData.getProductDetails(product).then(function(data) {
$scope.productDetails = data;
})
**Line 445** .catch(function(fallback) {
$scope.buildProductDetails(product);
});
} catch (err) {
$scope.buildProductDetails(product);
}
};
}
]);
在縮小,我得到錯誤無效catch塊:
[ERROR] 445:27:missing name after . operator
[ERROR] 446:32:syntax error
[ERROR] 447:22:'try' without 'catch' or 'finally'
[ERROR] 448:20:missing ; before statement
[ERROR] 449:24:syntax error
[ERROR] 451:9:missing ] after element list
[ERROR] 452:5:syntax error
[ERROR] 453:2:syntax error
我怎麼知道YUI .catch是角度捕捉不是傳統的嘗試捕捉。 請幫助