I'm sure there's a common practice for this, but I don't know what it is.
I'd like to load some constants from our remote database and use them
within the my application. For example, I'd use a resource like so...
webRequest.query({id: 0}, function(result) { $scope.model.webRequests =
result; });
These webRequests might look like this:
[ {1, 'First Value'}, {2, 'Second Value}, {3, 'Third Value'}, ...]
And I'd like to use these within the code of my angular application. I'm
guessing I just run the resource query on application startup, then store
these webRequest values using the angular .value function? Is it that
simple, or is there a better suggested practice?
Thanks,
Jonathan
--
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.