Skip to content

Commit e5acacc

Browse files
committed
fix(doc): update README with installation instructions
1 parent a1bb423 commit e5acacc

File tree

1 file changed

+34
-5
lines changed

1 file changed

+34
-5
lines changed

README.md

Lines changed: 34 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,26 +17,55 @@ View all the directives in action at https://tinesoft.github.io/ngx-wow
1717

1818
## Dependencies
1919
* [Angular](https://angular.io) (*requires* Angular 2 or higher, tested with 2.0.0)
20+
* [WOW JS](http://mynameismatthieu.com/WOW/) (*requires* WOW JS 1.1 or higher, tested with 1.1.3)
2021

21-
## Installation
22-
Install above dependencies via *npm*.
2322

24-
Now install `ngx-wow` via:
23+
## Installation
24+
Install above dependencies via *npm*. In particular for `WOW JS`, run:
2525
```shell
26-
npm install --save ngx-wow
26+
npm install --save wowjs
2727
```
2828

2929
---
30+
##### Angular-CLI
31+
>**Note**: If you are using `angular-cli` to build your app, make sure that `wowjs` is properly listed as a [global library](https://github.com/angular/angular-cli#global-library-installation), by editing your `angular-cli.json` as such:
32+
```
33+
"scripts": [
34+
"../node_modules/wowjs/dist/wowjs.js"
35+
],
36+
```
37+
3038
##### SystemJS
3139
>**Note**:If you are using `SystemJS`, you should adjust your configuration to point to the UMD bundle.
3240
In your systemjs config file, `map` needs to tell the System loader where to look for `ngx-wow`:
3341
```js
3442
map: {
35-
'ngx-wow': 'node_modules/ngx-wow/bundles/ngx-wow.umd.js',
43+
'ngx-wow': 'node_modules/ngx-wow/bundles/ngx-wow.min.js',
3644
}
3745
```
46+
In your systemjs config file, `meta` needs to tell the System loader how to load `wowjs`:
47+
```js
48+
meta: {
49+
'./node_modules/wowjs/dist/wow.js': {
50+
format: 'amd'
51+
}
52+
}
53+
```
54+
In your index.html file, add script tag to load `wowjs` globally:
55+
```html
56+
<!-- 1. Configure SystemJS -->
57+
<script src="system.config.js"></script>
58+
<!-- 2. Add WOW dependency-->
59+
<script src="node_modules/wowjs/dist/wow.js"></script>
60+
```
61+
3862
---
3963

64+
Now install `ngx-wow` via:
65+
```shell
66+
npm install --save ngx-wow
67+
```
68+
4069
Once installed you need to import the main module:
4170
```js
4271
import { NgwWowModule } from 'ngx-wow';

0 commit comments

Comments
 (0)