Skip to content

Fix typographical error(s) #1248

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ You can also **check out [a video introduction of a talk I gave at Devoxx France
- [setFullResponse](#setfullresponse)
- [setDefaultHeaders](#setdefaultheaders)
- [setRequestSuffix](#setrequestsuffix)
- [setUseCannonicalId](#setusecannonicalid)
- [setUseCanonicalId](#setusecanonicalid)
- [How to configure them globally](#how-to-configure-them-globally)
- [Configuring in the config](#configuring-in-the-config)
- [Configuring in the run](#configuring-in-the-run)
Expand Down Expand Up @@ -464,7 +464,7 @@ Restangular required 3 fields for every "Restangularized" element. These are:
* route: Name of the route of this element. Default: route
* parentResource: The reference to the parent resource. Default: parentResource
* restangularCollection: A boolean indicating if this is a collection or an element. Default: restangularCollection
* cannonicalId: If available, the path to the cannonical ID to use. Useful for PK changes
* canonicalId: If available, the path to the canonical ID to use. Useful for PK changes
* etag: Where to save the ETag received from the server. Defaults to `restangularEtag`
* selfLink: The path to the property that has the URL to this item. If your REST API doesn't return a URL to an item, you can just leave it blank. Defaults to `href`

Expand Down Expand Up @@ -545,9 +545,9 @@ RestangularProvider.setDefaultHeaders({token: "x-restangular"});

If all of your requests require to send some suffix to work, you can set it here. For example, if you need to send the format like `/users/123.json` you can add that `.json` to the suffix using the `setRequestSuffix` method

#### setUseCannonicalId
#### setUseCanonicalId

You can set this to either `true` or `false`. By default it's false. If set to true, then the cannonical ID from the element will be used for URL creation (in DELETE, PUT, POST, etc.). What this means is that if you change the ID of the element and then you do a put, if you set this to true, it'll use the "old" ID which was received from the server. If set to false, it'll use the new ID assigned to the element.
You can set this to either `true` or `false`. By default it's false. If set to true, then the canonical ID from the element will be used for URL creation (in DELETE, PUT, POST, etc.). What this means is that if you change the ID of the element and then you do a put, if you set this to true, it'll use the "old" ID which was received from the server. If set to false, it'll use the new ID assigned to the element.

#### setEncodeIds

Expand Down