mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-03-16 23:30:23 +00: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:
parent
cad5a367c3
commit
c0e10683a6
1 changed files with 3 additions and 3 deletions
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Reference in a new issue