Skip to content

Commit 647498b

Browse files
committed
Update README.md
1 parent 80335af commit 647498b

1 file changed

Lines changed: 9 additions & 24 deletions

File tree

README.md

Lines changed: 9 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,15 @@
1-
## angular-module-shim
1+
## angular-module-tree
22

3-
### Install
4-
5-
```
6-
bower install --save angular-module-shim
7-
```
8-
9-
### Rationale
10-
11-
Adjusts the behaviour of `angular.module` so as to make module retrieval and creation order agnostic.
12-
13-
In other words you can append components onto modules without worrying whether the module has been explicitly created yet.
14-
15-
Particularly useful when your Angular project has a scalable/granular file structure with module creation and retrieval happening in individual files but your build process is just concatenating app files together in an arbitrary order.
16-
17-
Makes the following code legal:
3+
### How to
184

195
```javascript
20-
angular.module('foo')
21-
.controller('FooCtrl',function () {});
226

23-
angular.module('foo',['bar','baz']);
24-
```
7+
angular.module('app',['aaa']);
258

26-
### Thanks/links
9+
angular.module('aaa.bbb')
10+
.controller('BbbCtrl',function () {});
11+
12+
angular.module('aaa.bbb.xxx')
13+
.controller('XxxCtrl',function () {});
2714

28-
- [An improved Angular.module()](http://www.hiddentao.com/archives/2013/11/04/an-improved-angular-module-split-your-modules-into-multiple-files/) - Hiddentao
29-
- [Stop Angular Overrides](https://github.com/bahmutov/stop-angular-overrides) - Bahmutov
30-
- [Creating a module twice fails silently #1779](https://github.com/angular/angular.js/issues/1779) - Angular Issue
15+
```

0 commit comments

Comments
 (0)