Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

Commit

Permalink
docs(guide): fix injector service code example
Browse files Browse the repository at this point in the history
Fix syntax and update code to the latest API
  • Loading branch information
romainneutron authored and pkozlowski-opensource committed Dec 10, 2012
1 parent c398d7d commit a66c968
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/content/guide/di.ngdoc
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,11 @@ Here is an example of using the injector service.
$window.alert(text);
}
};
}).
});

// New injector is created from the module.
// (This is usually done automatically by angular bootstrap)
var injector = angular.injector('myModule');
var injector = angular.injector(['myModule', 'ng']);

// Request any dependency from the injector
var greeter = injector.get('greeter');
Expand Down

0 comments on commit a66c968

Please sign in to comment.