Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Resource clobbering moment objects #3767

Closed
@gingermusketeer

Description

@gingermusketeer

For the project I am working we are making use of a custom $httpProvider.defaults.transformResponse handler. It is doing things like converting to camel case and turning dates strings into momentjs objects.

This approach has mostly been working except I have run into an issue where the moment objects are being turned into normal objects. Looking at the source it appears that the issue is to do with angular.copy not preserving the object state/behavior. I tried to get around this by using setters and getters but these are also lost in translation. It would be great if there was some way to customise/configure the resource constructor or perhaps the copy function to prevent this.

angular -v => 1.0.7

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions