0
如何使用Restangular保存新對象? 當我在客戶對象上執行save()時,出現此錯誤。任何想法爲什麼?使用Restangular保存對象的問題
saving "customer name" customers.js?body=1:14
TypeError: undefined is not a function
HTML
<form ng-submit="save(customer)">
<input type="text" ng-model="customer.name">
控制器(CoffeeScript的)
$scope.save = (customer) ->
console.log("saving '#{customer.name}'") # this works
customer.save()