diff options
| author | Caitlin Potter | 2014-02-06 14:02:18 +0000 |
|---|---|---|
| committer | Peter Bacon Darwin | 2014-02-16 19:03:40 +0000 |
| commit | f7d28cd377f06224247b950680517a187a7b6749 (patch) | |
| tree | 20203b9f7bf60748bb752f325b1869415352a6f3 /docs/content/guide/dev_guide.services.managing_dependencies.ngdoc | |
| parent | 2e641ac49f121a6e2cc70bd3879930b44a8a7710 (diff) | |
| download | angular.js-f7d28cd377f06224247b950680517a187a7b6749.tar.bz2 | |
docs(all): convert <pre>/</pre> snippets to GFM snippets
Diffstat (limited to 'docs/content/guide/dev_guide.services.managing_dependencies.ngdoc')
| -rw-r--r-- | docs/content/guide/dev_guide.services.managing_dependencies.ngdoc | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/docs/content/guide/dev_guide.services.managing_dependencies.ngdoc b/docs/content/guide/dev_guide.services.managing_dependencies.ngdoc index 6dafc3f7..726a8bbe 100644 --- a/docs/content/guide/dev_guide.services.managing_dependencies.ngdoc +++ b/docs/content/guide/dev_guide.services.managing_dependencies.ngdoc @@ -12,37 +12,37 @@ dropped (see "Inferring `$inject`" but note that that is currently an experiment Using the array notation: -<pre> +```js function myModuleCfgFn($provide) { $provide.factory('myService', ['dep1', 'dep2', function(dep1, dep2) {}]); } -</pre> +``` Using the $inject property: -<pre> +```js function myModuleCfgFn($provide) { var myServiceFactory = function(dep1, dep2) {}; myServiceFactory.$inject = ['dep1', 'dep2']; $provide.factory('myService', myServiceFactory); } -</pre> +``` Using DI inference (incompatible with minifiers): -<pre> +```js function myModuleCfgFn($provide) { $provide.factory('myService', function(dep1, dep2) {}); } -</pre> +``` Here is an example of two services, one of which depends on the other and both of which depend on other services that are provided by the Angular framework: -<pre> +```js /** * batchLog service allows for messages to be queued in memory and flushed * to the console.log every 50 seconds. @@ -83,7 +83,7 @@ of which depend on other services that are provided by the Angular framework: // get the main service to kick off the application angular.injector([batchLogModule]).get('routeTemplateMonitor'); -</pre> +``` Things to notice in this example: |
