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 8825317
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T06:50:58+00:00 2026-06-14T06:50:58+00:00

from the documentation ( http://docs.angularjs.org/api/ngResource.$resource ): $resource(url[, paramDefaults][, actions]); paramDefaults(optional) – {Object=} – Default

  • 0

from the documentation (http://docs.angularjs.org/api/ngResource.$resource):

$resource(url[, paramDefaults][, actions]);

paramDefaults(optional) – {Object=} – Default values for url parameters.
…
If the parameter value is prefixed with @ then the value of that parameter is extracted from the data object.

The question is what data object do they refer to? How to use this feature?

  • 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-14T06:50:59+00:00Added an answer on June 14, 2026 at 6:50 am

    lets say you have a resource like this:

    var User = $resource('/user/:userId', {userId:'@id'});
    var user = User.get({userId:123});
    

    It means that the value of :userId in your url will be replaced with the id property from the user object when that property is required.

    So when is it required? Its required when you are doing something to an existing user, like geting one, updating one. It is not required when you create a user.

    In most cases, you will want to have at least one param prefixed with @ in your REST url that resource uses (probably the object id). If you dont have one, that means that in order for you to save an instance of an object, you dont need to know anything about where its stored. This implies that its a singleton object. Maybe like a settings object.

    Here is your long awaited example:

    var User = $resource('/user/:userId/:dogName', {userId:'@id', dogName:@dog});
    User.get({userId:123, dog:'Matt'}, function() { .. })
    

    will produce the request: GET /user/123/Matt

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

Sidebar

Related Questions

This is a simple example from the python documentation (http://docs.python.org/extending/extending.html): static PyObject * spam_system(PyObject
Python documentation from http://docs.python.org/library/string.html : string.lstrip(s[, chars]) Return a copy of the string with
Im trying to implement my own glOtho function from the opengles docs http://www.khronos.org/opengles/documentation/opengles1_0/html/glOrtho.html to
I'm having trouble understanding the documentation of os.times() . From http://docs.python.org/library/os.html : Return a
I'm looking the documentation about publishing the message to wall from Facebook app http://developers.facebook.com/docs/reference/dialogs/feed/
From this page: http://www.doctrine-project.org/documentation/manual/1_2/en/working-with-models#dealing-with-relations:creating-related-records You can see that it says $obj['property']; is the recommended
From the play2's doc: http://www.playframework.org/documentation/2.0/ScalaForms , there is a sample code: val loginForm =
I wondering is there an equivalent of this feature from play framework http://www.playframework.org/documentation/2.0/JavaAsync Basicly
The os.walk documentation ( http://docs.python.org/library/os.html ? highlight=os.walk#os.walk), says I can skip traversing unwanted directories
I have downloaded Java API documentation from http://www.oracle.com/technetwork/java/javase/downloads/index.html#docs and have supposedly attached it to

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.