angularjs autosave form is it the right way?
问题 My goal is to autosave a form after is valid and update it with timeout. I set up like: (function(window, angular, undefined) { 'use strict'; angular.module('nodblog.api.article', ['restangular']) .config(function (RestangularProvider) { RestangularProvider.setBaseUrl('/api'); RestangularProvider.setRestangularFields({ id: "_id" }); RestangularProvider.setRequestInterceptor(function(elem, operation, what) { if (operation === 'put') { elem._id = undefined; return elem; } return elem; }); })