[WIP] Strip restangular methods from entries#278
Open
fzaninotto wants to merge 1 commit intomasterfrom
Open
Conversation
Contributor
There was a problem hiding this comment.
We can maybe put this in the view.mapEntry method ?
Contributor
|
Restangular methods aren't used on the object himself, we can remove them |
Member
Author
|
As a matter of fact, my patch doesn't solve #273, because properties named like Restangular methods (like "head") are added then removed, so there is no way to read them. We need a way to prevent Restangular from decorating them in the first place. |
Member
Author
|
We can't prevent Restangular from decorating, but we can get the original entity by adding a listener (see mgonto/restangular#100 (comment)). Back to WIP. |
e7d8215 to
468cd88
Compare
Member
Author
|
I've fixed the bug, but there are two drawbacks:
So this needs more work. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Angular adds its own method to every entity fetched. As they are not namespaced, this has side effects.
I removed them, but I'm not sure we don't use them. @manuquentin, any insight?
Fixes #273