-
Notifications
You must be signed in to change notification settings - Fork 830
Open
Description
Hi there,
Here is my data structure:
{
name: "Tasklist name",
tasks: [{
name: "Plant a tree"
}, {
name: "Say hi to Grandpa"
}]
}
I called:
Restangular.one("tasklists", 123).get().then(function(tasklist) {
Restangular.restangularizeCollection(tasklsit, tasklist.tasks, 'tasks');
});
This works fine. However, when I call task.put(), it throws a TypeError: Converting circular structure to JSON.
This is because the task element contains a "element" attribute, probably added by angular while iterating through the list.
If I set it to null before sending the request, it gets converted to json properly and works.
Is there a way I can tell Restangular how to serialize my object (and ignore the element attribute)?
Thanks
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels