Skip to content

Conversation

@fzaninotto
Copy link
Member

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

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can maybe put this in the view.mapEntry method ?

@manuquentin
Copy link
Contributor

Restangular methods aren't used on the object himself, we can remove them

@fzaninotto
Copy link
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.

@fzaninotto
Copy link
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.

@fzaninotto fzaninotto changed the title [RFR] Strip restangular methods from entries [WIP] Strip restangular methods from entries Feb 3, 2015
@fzaninotto
Copy link
Member Author

I've fixed the bug, but there are two drawbacks:

  • This breaks all tests using Restangular (long and cumbersome to fix)
  • This slows down the app, as we have to clone all entries in order

So this needs more work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug with wysiwyg field named "head"

3 participants