Skip to content
This repository was archived by the owner on Jan 17, 2022. It is now read-only.

Commit d47cd63

Browse files
author
Jesper Lindstrøm Nielsen
committed
updated the readme, so it contains npm and webpack installation
1 parent f3cae0e commit d47cd63

File tree

2 files changed

+22
-53
lines changed

2 files changed

+22
-53
lines changed

README.md

+22-15
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,19 @@ You can install this package through `Bower` by using the following command :
1313

1414
bower install angular-intro.js --save
1515

16+
## NPM
17+
18+
You can install this package through `NPM` by using the following command :
19+
20+
npm install angular-intro.js --save
21+
22+
## Webpack
23+
24+
You can use this package in your webpack project, first by including `intro.js` and its css file. Next you need to require this package.
25+
26+
import ngIntro from 'angular-intro.js';
27+
28+
This project will return you the hole angular module so if you want to use as a dependency in your own angular module you would need to reference the name `ngIntro.name`.
1629

1730
## How to use
1831

@@ -22,35 +35,35 @@ The two main directives are `ng-intro-options` and `ng-intro-method`.
2235

2336
`ng-intro-options="IntroOptions"`
2437

25-
You should create a `$scope.IntroOptions` in your controller which contains the intro.js options. The options are exactly the same as [the original](https://github.com/usablica/intro.js#options). This also allows you to modify the options as part of your controller behavior if necessary. You don't have to use `IntroOptions`, you can specify some other name.
38+
You should create a `$scope.IntroOptions` in your controller which contains the intro.js options. The options are exactly the same as [the original](https://github.com/usablica/intro.js#options). This also allows you to modify the options as part of your controller behavior if necessary. You don't have to use `IntroOptions`, you can specify some other name.
2639

2740
### Start method
2841

29-
`ng-intro-method="CallMe"`
42+
`ng-intro-method="CallMe"`
3043

3144
The directive will create a method on `$scope.CallMe` so that you can invoke it yourself later. Make sure the there isn't a method `CallMe` already in your controller. To use the method be sure to wrap it with `$timeout`. You don't have to use `CallMe`, you can specify some other name.
3245

3346
### Call the start method
3447

35-
You can invoke it from an event such a click,
48+
You can invoke it from an event such a click,
3649

37-
`ng-click="CallMe();"`
50+
`ng-click="CallMe();"`
3851

3952
as long as you are still in the same controller scope. You can also specify a step number in the method call, `CallMe(3);`.
4053

4154
You can start the intro from code, either call `$scope.CallMe();`. If the `$scope.CallMe();` doesn't work, it might be because your DOM isn't ready. Put it in a `$timeout`.
4255

4356
### Autostart
4457

45-
If you set `ng-intro-autostart="true"`, the intro will start as soon as the directive is ready.
58+
If you set `ng-intro-autostart="true"`, the intro will start as soon as the directive is ready.
4659

4760
### Autorefresh
4861

4962
If an intro tour includes dynamic content, use `ng-intro-autorefresh="true"` to call Intro.js' refresh method.
5063

5164
### Callbacks
5265

53-
Intro.js provides several callbacks. You can receive these callbacks in your controller. For example, for the `onchange` event, specify the function name in the directive.
66+
Intro.js provides several callbacks. You can receive these callbacks in your controller. For example, for the `onchange` event, specify the function name in the directive.
5467

5568
`ng-intro-onchange="ChangeEvent"`
5669

@@ -81,19 +94,19 @@ You can also use this [sample plunker](http://plnkr.co/edit/wo9EzfbOFjM7NDoAvmjA
8194
If you want to build or contribute, first, get the node modules needed (grunt, bower)
8295

8396
npm install
84-
97+
8598
Next, use bower to get the JS libraries needed
8699

87100
node_modules/.bin/bower install
88101

89102
Then, whenever you make any changes, get grunt to build the minified angular-intro.min.js
90103

91-
node_modules/.bin/grunt
104+
node_modules/.bin/grunt
92105

93106
Finally, view the demo page to make sure everything's working; start a web server:
94107

95108
./node_modules/.bin/grunt connect:server
96-
109+
97110
And browse to `http://localhost:8000/example/index.html`
98111

99112

@@ -102,9 +115,3 @@ And browse to `http://localhost:8000/example/index.html`
102115
## License
103116

104117
As with intro.js, this is under the [MIT license](https://github.com/mendhak/angular-intro.js/blob/master/LICENSE).
105-
106-
107-
108-
109-
110-

package.json

-38
This file was deleted.

0 commit comments

Comments
 (0)