mirror of
https://github.com/zhigang1992/angular.js.git
synced 2026-04-11 10:59:24 +08:00
docs(api): example for $provide.value() uses $provide.value()
The example code for `$provide.value()` actually used `$provide.constant()`. It now uses `$provide.value()`. Closes #4983 Closes #4990
This commit is contained in:
committed by
Pete Bacon Darwin
parent
cad5a367c3
commit
c0e10683a6
@@ -501,11 +501,11 @@ function annotate(fn) {
|
||||
* @example
|
||||
* Here are some examples of creating value services.
|
||||
* <pre>
|
||||
* $provide.constant('ADMIN_USER', 'admin');
|
||||
* $provide.value('ADMIN_USER', 'admin');
|
||||
*
|
||||
* $provide.constant('RoleLookup', { admin: 0, writer: 1, reader: 2 });
|
||||
* $provide.value('RoleLookup', { admin: 0, writer: 1, reader: 2 });
|
||||
*
|
||||
* $provide.constant('halfOf', function(value) {
|
||||
* $provide.value('halfOf', function(value) {
|
||||
* return value / 2;
|
||||
* });
|
||||
* </pre>
|
||||
|
||||
Reference in New Issue
Block a user