June 2014
Intermediate to advanced
696 pages
38h 52m
English
You use the very simple value service to define a single value that you can inject as a service provider. The value method uses the following syntax, where name is the service name and object is any JavaScript object you want to provide:
value(name, object)
For example:
var app = angular.module('myApp', []);app.value('myValue', {color:'blue', value:'17'});
Read now
Unlock full access