私はビジネス上の問題を解決するためにHTML application(HTA)を開発する必要があります。私は、フードの下でAngularを使用すると、開発が大幅に楽になると考えています。IE 9を実行しているHTAでAngularの動作を取得するにはどうすればよいですか?
私はng new
を経由して、新たな角度プロジェクトを作成し、いくつかの小さな変更(下記に詳細を)作ったが、私が構築されたHTAファイルを実行すると、私はこのエラーを取得しました:
Error: 'console' is undefined
、ページがロードされませんHTAウィンドウに表示されます。
はHTAは、IE 9(アプリケーションの要件以降のブラウザのバージョンの使用を妨げる)を使用するため、アプリケーションは、このメタタグを含む:
<meta http-equiv="X-UA-Compatible" content="IE=9">
Angular's documentation states that IE 9 is supported Iはpolyfills.ts
に必要polyfillsの全てのコメントを解除した場合、私がやったどの:
/** IE9, IE10 and IE11 requires all of the following polyfills. **/
import 'core-js/es6/symbol';
import 'core-js/es6/object';
import 'core-js/es6/function';
import 'core-js/es6/parse-int';
import 'core-js/es6/parse-float';
import 'core-js/es6/number';
import 'core-js/es6/math';
import 'core-js/es6/string';
import 'core-js/es6/date';
import 'core-js/es6/array';
import 'core-js/es6/regexp';
import 'core-js/es6/map';
import 'core-js/es6/weak-map';
import 'core-js/es6/set';
私はindex.hta
に含まindex.html
ファイルを名前を変更し、.angular-cli.json
に対応する変更を行いました。
私が行方不明console
を回避するためにpolyfills.ts
に直接次のコードを入れて試してみた:
if (!window.console) console = {error: function() {}};
が、それは私がconsole
を再定義好きではないので、私は、すべてで構築することはできません。
ERROR in src/polyfills.ts(77,22): error TS2322: Type '{ error:() => void; }' is not assignable to type 'Console'.
Property 'assert' is missing in type '{ error:() => void; }'.
誰もがここから進める方法を提案できますか?