Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b76ed0b

Browse files
roylingpetebacondarwin
authored andcommitted
docs(tutorial/step-5): add missing formatting to examples
The indenting doesn't work for code samples that are inside bullet points. Closes angular#4403
1 parent cd216c4 commit b76ed0b

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

docs/content/tutorial/step_05.ngdoc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -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>
131131
Both of these methods work with any function that can be injected by Angular, so it's up to your
132132
project's style guide to decide which one you use.
133133

134134
When using the second method, it is common to provide the constructor function inline as an
135135
anonymous function when registering the controller:
136-
136+
<pre>
137137
phonecatApp.controller('PhoneListCtrl', ['$scope', '$http', function($scope, $http) {...}]);
138-
138+
</pre>
139139

140140
From this point onward, we're going to use the inline method in the tutorial. With that in mind,
141141
let's add the annotations to our `PhoneListCtrl`:

0 commit comments

Comments
 (0)