Skip to content

Commit ba935b2

Browse files
author
Thomas Grainger
committed
update documenation for esm/cjs
1 parent 80cacf6 commit ba935b2

File tree

1 file changed

+26
-6
lines changed

1 file changed

+26
-6
lines changed

README.md

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@ How can I install it?
1010
============
1111
1) Get the library:
1212

13+
**npm**
14+
15+
npm install angular @flowjs/ng-flow
16+
1317
**Direct Download**
1418
Download a latest build from https://github.com/flowjs/ng-flow/releases
1519
it contains development and minified production files in `dist/` directory,
1620
they are also concatenated with core flow.js library.
1721

18-
**Using Bower**
19-
20-
bower install ng-flow#~2
21-
2222
**Git Clone**
2323

2424
git clone https://github.com/flowjs/ng-flow
@@ -28,11 +28,20 @@ they are also concatenated with core flow.js library.
2828
bower install "ng-flow#~2" --save
2929
grunt bower-install
3030
31-
2) Add the module to your app as a dependency:
31+
2) Add the module to a module in your app as a dependency:
32+
33+
import angular from 'angular';
34+
import ngFlow from '@flowjs/ng-flow';
35+
36+
const MODULE_NAME = 'appName.moduleName';
37+
angular.module(MODULE_NAME, [ngFlow]);
3238

33-
angular.module('app', ['flow'])
39+
export default MODULE_NAME;
3440
3541
3) Include the files in your project
42+
See https://www.npmjs.com/package/webpack or https://www.npmjs.com/package/browserify
43+
44+
or for legacy applications:
3645
```html
3746
<!-- concatenated flow.js + ng-flow libraries -->
3847
<script src="ng-flow/dist/ng-flow-standalone.min.js"></script>
@@ -253,6 +262,17 @@ var app = angular.module('app', ['flow'])
253262
}]);
254263
````
255264

265+
Bower
266+
=====
267+
268+
Bower has been deprecated in favour of yarn/webpack, however it is still
269+
supported by ng-flow for legacy applications.
270+
271+
**Using Bower**
272+
273+
bower install ng-flow#~2
274+
275+
256276
Contribution
257277
============
258278
To ensure consistency throughout the source code, keep these rules in mind as you are working:

0 commit comments

Comments
 (0)