Hi,

I'm working on an angular app with data coming from a REST API.
The REST API sends a JSON for each resource and the data in the JSON is 
very specificly named (like Uid, ULKlogin, ...).
Since a model layer is meant to be easily changeable, i think there is 
something wrong in binding data with such specific names directly in view.

What are the best practices concerning this problem and the model layer in 
general ?

Currently, I'm using $resource directly in the controller and binding the 
result to the scope.
When there is a form, I'm just sending back the same object in the $scope 
(with user modifications included) to the API.

What are the best practices for forms ?
Is it better to copy, and 'translate' the JSON from the API to something 
more generic and then 'untranslate' it before sending it back to the API ?

Thanks !

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to