Angularを外部に保ち、ビルドにバンドルしないで、Browserify-Shim Angular 2の方法を知っている人はいますか?
//package.json
{
"name": "testapp",
"version": "1.0.0",
"main": "./app.js",
"browserify-shim": {
"angular2": "global:angular2"
},
"browserify": {
"transform": [ "browserify-shim" ]
},
"dependencies": {
"browserify-shim": "~3.2.0"
}
}
...
//app.ts
import {Component, View, bootstrap, NgFor} from 'angular2';
結果:
TypeError: angular2_1 is undefined