diff --git a/docs/content/guide/di.ngdoc b/docs/content/guide/di.ngdoc index a9280103..75d016b6 100644 --- a/docs/content/guide/di.ngdoc +++ b/docs/content/guide/di.ngdoc @@ -196,14 +196,13 @@ Controllers are classes which are responsible for application behavior. The reco declaring controllers is:
- var MyController = function(dep1, dep2) {
- ...
- }
- MyController.$inject = ['dep1', 'dep2'];
-
- MyController.prototype.aMethod = function() {
+ var MyController = function($scope, dep1, dep2) {
...
+ $scope.aMethod = function() {
+ ...
+ }
}
+ MyController.$inject = ['$scope', 'dep1', 'dep2'];