Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8610419
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T04:07:29+00:00 2026-06-12T04:07:29+00:00

When calling $save on an ngResource, is it possible to POST only the edited

  • 0

When calling $save on an ngResource, is it possible to POST only the edited fields rather than POSTing the entire model each time?

var User = $resource('http://example.com/user/123/');

User.get(function(user) {
  user.name="John Smith";
  user.$save();
  // What I *want* -> POST: /user/123/ {name:'John Smith'}
  // What currently happens -> POST: /user/123/ {name:'John Smith', age: 72, location: 'New York', noOfChildren: 5}
});
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T04:07:30+00:00Added an answer on June 12, 2026 at 4:07 am

    No, it’s not possible, at least not on instances, see http://docs.angularjs.org/api/ngResource.$resource

    […] The action methods on the class object or instance object can be invoked with the following
    parameters:

    • HTTP GET “class” actions: Resource.action([parameters], [success], [error])
    • non-GET “class” actions: Resource.action([parameters], postData, [success], [error])
    • non-GET instance actions: instance.$action([parameters], [success], [error])

    So, it’s only possible by passing the data to save to the “static” save method, ie User.save. Something like this:

    User.get(function(user)
    {
        user.name = 'John Smith';
        User.save({name: user.name});
    });
    

    Whether this works out for you will probably depend on what you’re going to do with the user instance.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm calling save() on a backbone model to do a POST operation on the
I'm calling 'save' on my model and returning the new model as json in
I have code which is updating a model's property then calling save! . A
When calling model.save(), in chrome it shows it is sending Request Payload parameters. I
If I do the following session.getTransaction().rollback(); is it then ok/possible to start calling save/update/delete
I want my model to save to the server every time it changes. I
Calling the WriteObject Method from a background thread is not possible! Is there a
In my symfony application I would like to get form model object before calling
I want to create an object in Django before calling the save method. This
I need to save my data by calling a method I already have when

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.