This repository has been archived by the owner on Apr 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 27.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat($resource): collapse empty suffix parameters correctly
Previously only repeated `/` delimiters were collapsed into a single `/`. Now, the sequence `/.` at the end of the template, i.e. only followed by a sequence of word characters, is collapsed into a single `.`. This makes it easier to support suffixes on resource URLs. For example, given a resource template of `/some/path/:id.:format`, if the `:id` is `""` but format `"json"` then the URL is now `/some/path.json`, rather than `/some/path/.json`. BREAKING CHANGE: A `/` followed by a `.`, in the last segment of the URL template is now collapsed into a single `.` delimiter. For example: `users/.json` will become `users.json`. If your server relied upon this sequence then it will no longer work. In this case you can now escape the `/.` sequence with `/\.`
- Loading branch information
1 parent
c32a859
commit 5306136
Showing
2 changed files
with
169 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 comment
on commit 5306136
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's wrong behavior. In URL /
means much more, than .
. So if you want (for some interesting reason) to replace this part of URL, you should keep /
anyway. And I don't understand why you think that angular should change URL at all.
This example is wrong, right? The left side should say
id/.format
, notid./format
.