How to Browserify-Shim Angular 2?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP



How to Browserify-Shim Angular 2?



Anyone know how to Browserify-Shim Angular 2, while keeping Angular external and not bundling it in the build?


//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';



Result:


TypeError: angular2_1 is undefined





i guess you should add another transform named "tsify" to compile ts file.
– sertaconay
Jan 4 '16 at 12:58









By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

Firebase Auth - with Email and Password - Check user already registered

Dynamically update html content plain JS

Creating a leaderboard in HTML/JS