prototype.jsを使用する既存のアプリケーションでAngular2を設定しようとしています。しかし、Angular2もprortotype.jsに依存しています(私が間違っていれば修正してください)ので、アプリケーションを読み込もうとすると、"maximum call stack size exceeded RangeError(in Chrome)"
が投げられます。私はAngular2の新機能です。Angular2がprototype.jsで動作しない
prototype.jsの依存関係を追加することで、Angular2クイックスターターアプリで再現できます。
<!DOCTYPE html>
<html>
<head>
<title>Angular QuickStart</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<base href="/">
<link rel="stylesheet" href="styles.css">
<!-- Polyfill(s) for older browsers -->
<script src="node_modules/core-js/client/shim.min.js"></script>
<script src="node_modules/zone.js/dist/zone.js"></script>
<script src="node_modules/systemjs/dist/system.src.js"></script>
<script src="systemjs.config.js"></script>
<script>
System.import('main.js').catch(function(err){ console.error(err); });
</script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/prototype/1.6.0.3/prototype.js"></script>
</head>
<body>
<my-app>Loading AppComponent content here ...</my-app>
</body>
</html>
ウェブインスペクタコンソールの部分スタックトレースは次のとおりです。
Error: (SystemJS) Maximum call stack size exceeded RangeError: Maximum call stack size exceeded at ParamDecoratorFactory (http://localhost:3000/node_modules/@angular/core/bundles/core.umd.js:401:39) at new (https://cdnjs.cloudflare.com/ajax/libs/prototype/1.6.0.3/prototype.js:214:23) at ParamDecoratorFactory
私が何か間違ったことをやっていますか?またはそうでない場合は、回避策がありますか?
ありがとうございます!