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()