Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
65 lines (50 sloc) 1.89 KB

Installation

InjectorJS is available both on client and server (NodeJS) sides. Follow next instructions to install it.

NodeJS

Using npm run next command:

$ npm install injector-js

or if you want to install it globally:

$ npm install -g injector-js

Then use its API to get necessary functionality:

var injector = require('injector-js').injector;

Enjoy!

Browser

To install ClazzJS you can use bower or can just manually download library from repository.

Bower

Run next command from your project directory:

$ bower install InjectorJS

Then add next tag to html header:

<script type="text/javascript" src="bower_components/ClazzJS/dist/ClazzJS.js"></script>
<script type="text/javascript" src="bower_components/InjectorJS/dist/InjectorJS.js"></script>

or if you want minified version:

<script type="text/javascript" src="bower_components/ClazzJS/dist/ClazzJS.min.js"></script>
<script type="text/javascript" src="bower_components/InjectorJS/dist/InjectorJS.min.js"></script>

Manually downloading

Download full or minified version of the library. Also you must download ClazzJS sources. Than put library into your project and add next tag to html header:

<script type="text/javascript" src="path/to/clazz-js-library.js"></script>
<script type="text/javascript" src="path/to/injector-js-library.js"></script>

That will add InjectorJS variable to your global scope. Use its API to get necessary functionality:

<script type="text/javascript">
  var injector = InjectorJS.injector;
</script>

Enjoy!

githalytics.com alpha

Something went wrong with that request. Please try again.