Adding to angular-cli project
install via npm
-npm install interpmat2
Edit the karam.conf.js file
{ pattern: 'node_modules/systemjs/dist/system-polyfills.js', included: true, watched: true },
{ pattern: 'node_modules/systemjs/dist/system.src.js', included: true, watched: true },
{ pattern: 'node_modules/es6-shim/es6-shim.js', included: true, watched: true },
{ pattern: 'node_modules/angular2/bundles/angular2-polyfills.js', included: true, watched: true },
{ pattern: 'node_modules/rxjs/bundles/Rx.js', included: true, watched: true },
{ pattern: 'node_modules/angular2/bundles/angular2.js', included: true, watched: true },
{ pattern: 'node_modules/angular2/bundles/http.dev.js', included: true, watched: true },
{ pattern: 'node_modules/angular2/bundles/router.dev.js', included: true, watched: true },
{ pattern: 'node_modules/angular2/bundles/testing.dev.js', included: true, watched: true },
{ pattern: 'node_modules/interpmat2/lib/', included: true, watched: true }, <---
Edit the node_modules angular-cli/lib/broccoli/angular2-app.js file
var vendorNpmFiles = [
'systemjs/dist/system-polyfills.js',
'systemjs/dist/system.src.js',
'es6-shim/es6-shim.js',
'angular2/bundles/angular2-polyfills.js',
'rxjs/bundles/Rx.js',
'angular2/bundles/angular2.dev.js',
'angular2/bundles/http.dev.js',
'angular2/bundles/router.dev.js',
'angular2/bundles/upgrade.dev.js',
'interpmat2/lib/**/*' <---
];
#update the index.html
<script src="vendor/es6-shim/es6-shim.js"></script>
<script src="vendor/systemjs/dist/system-polyfills.js"></script>
<script src="vendor/angular2/bundles/angular2-polyfills.js"></script>
<script src="vendor/systemjs/dist/system.src.js"></script>
<script>
System.config({
defaultJSExtensions: true,
packages: {
"vendor/angular2":{"defaultExtension":false}
},
map:{
'interpmat2':'vendor/interpmat2'
}
});
</script>
<script src="vendor/rxjs/bundles/Rx.js"></script>
<script src="vendor/angular2/bundles/angular2.dev.js"></script>
<script src="vendor/angular2/bundles/http.dev.js"></script>
<script src="vendor/angular2/bundles/router.dev.js"></script>
<script>
System.config({
packages: {
app: {
format: 'register',
defaultExtension: 'js'
}
}
});
System.import('app.js').then(null, console.error.bind(console));
</script>