angular - Adding npm libraries to Angular2 (v2.0.0-rc.1) app -


i'm struggling bring npm libraries angular2 app (in particular, https://github.com/manfredsteyer/angular2-oauth2).

when attempt import library app, 404. if add library systemjs.config.js map , packages sections, 404s library's dependencies. once add dependencies, 404s each dependency's dependencies (and on).

i've added typings map github repo well:

"dependencies": {   "angular2-oauth2": "github:manfredsteyer/angular2-oauth2/oauth-service.d.ts#0a0d321" } 

what missing here?

you need configure library , dependencies within systemjs configuration:

var map = {   'app': 'app', // 'dist',   '@angular': 'node_modules/@angular',   'angular2-in-memory-web-api': 'node_modules/angular2-in-memory-web-api',   'rxjs': 'node_modules/rxjs',   'angular2-oauth2': 'node_modules/angular2-oauth2',   'base64-js': 'node_modules/base64-js/lib/b64.js',   'sha256': 'node_modules/sha256/lib/sha256.js',   (...) }; 

here sample application webpack: https://github.com/manfredsteyer/angular2-rc1-sample.


Comments

Popular posts from this blog

wordpress - (T_ENDFOREACH) php error -

Export Excel workseet into txt file using vba - (text and numbers with formulas) -

Using django-mptt to get only the categories that have items -