June 2014
Intermediate to advanced
696 pages
38h 52m
English
The constant service is basically the same as the value service, except that constant services are available in the configuration phase of building the Module object, whereas value services are not. The constant method uses the following syntax, where name is the service name and object is any JavaScript object you want to provide:
constant(name, object)
For example:
var app = angular.module('myApp', []);app.constant('myConst', "Constant String");
Read now
Unlock full access