forked from mgechev/angular-seed
-
Couldn't load subscription status.
- Fork 0
Add external dependency
Sebastien de Salvador edited this page Mar 7, 2016
·
27 revisions
In his example we'll show how you can add angular2-jwt to the angular2-seed.
- Install the npm dependency.
npm install angular2-jwt --save- Reference the dependency inside of any TypeScript file part of the project.
Inside src/about/components/about.component.ts use:
import * as jwt from 'angular2-jwt/angular2-jwt';
// ...
console.log(jwt.AuthConfig);For such library you don't need NPM_DEPENDENCIES, since in dev it is loaded with SystemJS, and in production browserify will bundle it based in the reference in about.component.ts.