私はAngular2のカスタムレンダラーを試しています。Angular2のカスタムレンダラー
私はNode.jsで実行したいAngular2の最小アプリケーション(AppComponent
)でシンプルなexample projectを設定しました。私はカスタムDomAdapterとカスタムRenderer(ちょうどコンソールにログする必要があるダミー)を実装しました。そして、私はすべてをまとめていくつかcustom bootstrap codeに接続しようとしています。
現在、私は次のエラーメッセージとこだわっている:誰かがこの意味、何が欠けているものを説明でき
Error: No precompiled component AppComponent found
at new BaseException (/home/ralf/git/node-angular-example/node_modules/angular2/src/facade/exceptions.js:15:23)
at Compiler_.compileInHost (/home/ralf/git/node-angular-example/node_modules/angular2/src/core/linker/compiler.js:47:19)
at DynamicComponentLoader_.loadAsRoot (/home/ralf/git/node-angular-example/node_modules/angular2/src/core/linker/dynamic_component_loader.js:101:31)
at di_1.provide.useFactory (/home/ralf/git/node-angular-example/node_modules/angular2/src/core/application_ref.js:29:47)
at Injector._instantiate (/home/ralf/git/node-angular-example/node_modules/angular2/src/core/di/injector.js:763:27)
at Injector._instantiateProvider (/home/ralf/git/node-angular-example/node_modules/angular2/src/core/di/injector.js:714:25)
at Injector._new (/home/ralf/git/node-angular-example/node_modules/angular2/src/core/di/injector.js:703:21)
at InjectorInlineStrategy.getObjByKeyId (/home/ralf/git/node-angular-example/node_modules/angular2/src/core/di/injector.js:216:33)
at Injector._getByKeyDefault (/home/ralf/git/node-angular-example/node_modules/angular2/src/core/di/injector.js:899:37)
at Injector._getByKey (/home/ralf/git/node-angular-example/node_modules/angular2/src/core/di/injector.js:845:25)
?
更新: Tobias Boschは、COMPILER_PROVIDERS
が欠落していると指摘しています。ただし、それらを追加した後に別のエラーが表示されます。
Error: DI Exception
at NoProviderError.BaseException [as constructor] (/home/ralf/git/angular2-renderer-example/node_modules/angular2/src/facade/exceptions.js:15:23)
at NoProviderError.AbstractProviderError [as constructor] (/home/ralf/git/angular2-renderer-example/node_modules/angular2/src/core/di/exceptions.js:38:16)
at new NoProviderError (/home/ralf/git/angular2-renderer-example/node_modules/angular2/src/core/di/exceptions.js:74:16)
at Injector._throwOrNull (/home/ralf/git/angular2-renderer-example/node_modules/angular2/src/core/di/injector.js:854:19)
at Injector._getByKeyDefault (/home/ralf/git/angular2-renderer-example/node_modules/angular2/src/core/di/injector.js:905:21)
at Injector._getByKey (/home/ralf/git/angular2-renderer-example/node_modules/angular2/src/core/di/injector.js:845:25)
at Injector._getByDependency (/home/ralf/git/angular2-renderer-example/node_modules/angular2/src/core/di/injector.js:831:25)
at Injector._instantiate (/home/ralf/git/angular2-renderer-example/node_modules/angular2/src/core/di/injector.js:723:36)
at Injector._instantiateProvider (/home/ralf/git/angular2-renderer-example/node_modules/angular2/src/core/di/injector.js:714:25)
at Injector._new (/home/ralf/git/angular2-renderer-example/node_modules/angular2/src/core/di/injector.js:703:21)
これを理解するのを手伝ってもらえますか?どのプロバイダーが不足しているかをどのように知ることができます
更新2: XHRの実装が欠落していることが判明しました。 Adding a shimが問題を修正しました。今それは働いている。
こんにちは@nullfstx、これをng4 +にアップグレードする機会がありましたか? –
@ChrisTarasovsいいえ、私は結局、角度を使用してあきらめました。ごめんなさい。 – ralfstx