Skip to content

Commit 88659fd

Browse files
author
赵可
committed
optimize transition
1 parent 01c996f commit 88659fd

File tree

2 files changed

+678
-594
lines changed

2 files changed

+678
-594
lines changed

README.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -898,7 +898,7 @@ While this guide explains the *what*, *why* and *how*, I find it helpful to see
898898
899899
*Why?*: This makes it easier to test (mock or real) the data calls when testing a controller that uses a data service.
900900
901-
*Why?*: Data service implementation may have very specific code to handle the data repository. This may include headers, how to talk to the data, or other services such as $http. Separating the logic into a data service encapsulates this logic in a single place hiding the implementation from the outside consumers (perhaps a controller), also making it easier to change the implementation.
901+
*Why?*: Data service implementation may have very specific code to handle the data repository. This may include headers, how to talk to the data, or other services such as `$http`. Separating the logic into a data service encapsulates this logic in a single place hiding the implementation from the outside consumers (perhaps a controller), also making it easier to change the implementation.
902902
903903
```javascript
904904
/* recommended */
@@ -1010,7 +1010,7 @@ While this guide explains the *what*, *why* and *how*, I find it helpful to see
10101010
}
10111011
```
10121012
1013-
**[Back to top](#table-of-contents)**
1013+
**[Back to top](#table-of-contents)**
10141014
10151015
## Directives
10161016
### Limit 1 Per File
@@ -1022,7 +1022,7 @@ While this guide explains the *what*, *why* and *how*, I find it helpful to see
10221022
10231023
*Why?*: One directive per file is easy to maintain.
10241024
1025-
> Note: "**Best Practice**: Directives should clean up after themselves. You can use `element.on('$destroy', ...)` or `scope.$on('$destroy', ...)` to run a clean-up function when the directive is removed" ... from the Angular documentation
1025+
> Note: "**Best Practice**: Directives should clean up after themselves. You can use `element.on('$destroy', ...)` or `scope.$on('$destroy', ...)` to run a clean-up function when the directive is removed" ... from the Angular documentation.
10261026
10271027
```javascript
10281028
/* avoid */
@@ -1313,7 +1313,6 @@ While this guide explains the *what*, *why* and *how*, I find it helpful to see
13131313
**[Back to top](#table-of-contents)**
13141314
13151315
## Resolving Promises for a Controller
1316-
13171316
### Controller Activation Promises
13181317
###### [Style [Y080](#style-y080)]
13191318
@@ -1418,8 +1417,8 @@ While this guide explains the *what*, *why* and *how*, I find it helpful to see
14181417

14191418
Avengers.$inject = ['moviesPrepService'];
14201419
function Avengers(moviesPrepService) {
1421-
var vm = this;
1422-
vm.movies = moviesPrepService.movies;
1420+
var vm = this;
1421+
vm.movies = moviesPrepService.movies;
14231422
}
14241423
```
14251424
@@ -2188,6 +2187,7 @@ While this guide explains the *what*, *why* and *how*, I find it helpful to see
21882187
app.module.js
21892188
app.config.js
21902189
app.routes.js
2190+
directives.js
21912191
controllers/
21922192
attendees.js
21932193
session-detail.js
@@ -2328,12 +2328,12 @@ While this guide explains the *what*, *why* and *how*, I find it helpful to see
23282328
.module('app')
23292329
.run(runBlock);
23302330

2331-
runBlock.$inject = ['authenticator', 'translator'];
2331+
runBlock.$inject = ['authenticator', 'translator'];
23322332

2333-
function runBlock(authenticator, translator) {
2334-
authenticator.initialize();
2335-
translator.initialize();
2336-
}
2333+
function runBlock(authenticator, translator) {
2334+
authenticator.initialize();
2335+
translator.initialize();
2336+
}
23372337
```
23382338
23392339
**[Back to top](#table-of-contents)**

0 commit comments

Comments
 (0)