@@ -117,25 +117,25 @@ There are two ways to overcome issues caused by minification:
117117* You can create a `$inject` property on the controller function which holds an array of strings.
118118 Each string in the array is the name of the service to inject for the corresponding parameter.
119119 In the case of our example we would write:
120-
120+ <pre>
121121 function PhoneListCtrl($scope, $http) {...}
122122 PhoneListCtrl.$inject = ['$scope', '$http'];
123123 phonecatApp.controller('PhoneListCtrl', PhoneListCtrl);
124-
124+ </pre>
125125* Use the inline bracket notation which wraps the function to be injected into an array of strings
126126 (representing the dependency names) followed by the function to be injected:
127-
127+ <pre>
128128 function PhoneListCtrl($scope, $http) {...}
129129 phonecatApp.controller('PhoneListCtrl', ['$scope', '$http', PhoneListCtrl]);
130-
130+ </pre>
131131Both of these methods work with any function that can be injected by Angular, so it's up to your
132132project's style guide to decide which one you use.
133133
134134When using the second method, it is common to provide the constructor function inline as an
135135anonymous function when registering the controller:
136-
136+ <pre>
137137 phonecatApp.controller('PhoneListCtrl', ['$scope', '$http', function($scope, $http) {...}]);
138-
138+ </pre>
139139
140140From this point onward, we're going to use the inline method in the tutorial. With that in mind,
141141let's add the annotations to our `PhoneListCtrl`:
0 commit comments