angular-restmod
angular-restmod copied to clipboard
Maintain private nested properties on resources
Hi Guys, I am hoping that someone can help me with this
Imagine you have the following resource
{
$privatePropOne : 'value',
publicPropOne: {
$privatePropTwo: 'value',
publicPropTwo: 'value'
}
}
When this is sent to the server $privatePropOne remains in tact after the response. However $privatePropTwo is removed.
Currently I have dealt with this by extending the $save function, extracting the private nested properties and adding them back in once the resource has been returned.
However I wondered if anyone knew of a more elegant solution.
Any ideas would be greatly appreciated.
Thanks in advance
Gareth :)
You could use a nested resource.