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.

Returning cloned data from a service model fails with infinite recursion #6054

@MihaiValentin

Description

@MihaiValentin

I've got a service that acts as a model. In order not to expose the internal variable that holds data and make it by mistake modifiable by reference, when I return it, I do a angular.copy.

If the internal variable contains only primitives, that's fine. But if it contains also objects, it's not (I get 10 digest error).

Here is the fiddle: http://jsfiddle.net/aFBkP/1/

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions