mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-05-13 09:13:12 +00:00
docs(guide/injecting-services): fix indentation in example
Closes #4714
This commit is contained in:
parent
627f9ba091
commit
89a67ca77c
1 changed files with 8 additions and 8 deletions
|
|
@ -15,14 +15,14 @@ convention they match the service IDs, which has added benefits discussed below.
|
||||||
|
|
||||||
<pre>
|
<pre>
|
||||||
function myController($loc, $log) {
|
function myController($loc, $log) {
|
||||||
this.firstMethod = function() {
|
this.firstMethod = function() {
|
||||||
// use $location service
|
// use $location service
|
||||||
$loc.setHash();
|
$loc.setHash();
|
||||||
};
|
};
|
||||||
this.secondMethod = function() {
|
this.secondMethod = function() {
|
||||||
// use $log service
|
// use $log service
|
||||||
$log.info('...');
|
$log.info('...');
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
// which services to inject ?
|
// which services to inject ?
|
||||||
myController.$inject = ['$location', '$log'];
|
myController.$inject = ['$location', '$log'];
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue