Skip to content

Commit 9baa087

Browse files
author
Mark Lagendijk
committed
Update README.md
1 parent 5fffc53 commit 9baa087

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,14 @@ A service which makes it easy possible to have recursive Angular directives.
55
## Why
66
When an Angular directive calls itself, Angular gets into an endless loop. This service provides the logic needed to work around this.
77

8+
## Installation
9+
1. `bower install angular-recursion`.
10+
2. Include `bower_components/angular-recursion/angular-recursion.min.js`.
11+
3. Add the `RecursionHelper` module as a dependency.
12+
4. Inject the `RecursionHelper` service and use it.
13+
814
## Usage
9-
The service is used by injecting it into your directive and using it in the directives' compile function. The following example shows this. See [this Plunker](http://plnkr.co/edit/JAIyolmqPqO9KsynSiZp?p=preview) to see this example running.
15+
Inject the `RecursionHelper` service into your directive, and use it in the `compile` function, as shown in the example below. The example is also available as [a Plunker](http://plnkr.co/edit/JAIyolmqPqO9KsynSiZp?p=preview), so you can see it running.
1016

1117
``` javascript
1218
angular.module('myModule', ['RecursionHelper']).directive("tree", function(RecursionHelper) {
@@ -30,4 +36,4 @@ angular.module('myModule', ['RecursionHelper']).directive("tree", function(Recur
3036
}
3137
};
3238
});
33-
```
39+
```

0 commit comments

Comments
 (0)