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 a topic in the Google Groups "AngularJS" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/angular/zRTm0xd92fA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to angular+u...@googlegroups.com.
To post to this group, send email to ang...@googlegroups.com.
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.
--
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 angular+u...@googlegroups.com.