1. The values are not copied, just referenced.
2. You should not use your scope as your model, and you do not need to.
Put in the scope only the things needed in the view, neither more nor less.
This way there are less values to check.
3. Your service could be just a javascript empty object, where you store
anything you want.
angular.module(foo).service('bar',function(){ return this; });
Then in your controler
If(bar.baz === undefined){
bar.baz = $scope.baz
}
$scope.baz = bar.baz
If baz is an array or an object this will work fine, so you can use an object
to store strings and numbers
--
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.