के लिए कस्टम रेंडरर मैं Angular2 के लिए एक कस्टम रेंडरर के साथ प्रयोग कर रहा हूं।Angular2
मैंने न्यूनतम कोणीय 2 एप्लिकेशन (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)
किसी व्याख्या कर सकते हैं कि इसका क्या मतलब है और क्या याद आ रही है:
वर्तमान में, मैं निम्न त्रुटि संदेश के साथ फंस कर रहा हूँ?
अद्यतन: के रूप में टोबियास बॉश ने कहा, 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: यह पता चला कि एक्सएचआर का कार्यान्वयन गायब था। Adding a shim इस मुद्दे को हल किया गया। अब यह काम कर रहा है।
हाय @ralfstx, क्या आपको इसे ng4 + में अपग्रेड करने का मौका मिला है? –
@ChrisTarasovs नहीं, मैं अंततः कोणीय का उपयोग करने पर छोड़ दिया। माफ़ कीजिये। – ralfstx