1
我有這兩個功能:
var getConfigs = function() {
var defer = $q.defer();
$http.get('/api/Config/Get')
.success(function (data) {
defer.resolve({
configs: data,
});
});
return defer.promise;
}
var putConfigs = function(config) {
// When I check here I see config has some values
$http.put('/api/Config/Put', config);
}
當我打電話getConfigs()
我看到對面的提琴手數據來和$ scope.configs填充。但是,當我撥打putConfigs($scope.config);
時,我沒有看到任何提琴手,也沒有消息傳到我的主控制器。
有沒有人有任何想法可能是錯的。除了使用Chrome來瀏覽代碼和提琴手以觀察發生的事情之外,還有另一種方式可以調試發生的情況嗎?