我試圖擴展PrimeNg自動完成組件內部的角度。我需要在keyup.enter
上添加事件,以便我可以使它像通過自動完成選擇或創建新行爲。 我複製模板HTML,並添加NG_VALUE_ACCESSORS
指Extending a PrimeNg component inside Angular2和Extending components in PrimeNG擴展Angular 2中的Primeng自動完成組件
我仍然得到以下錯誤:
ERROR Error: No provider for DomHandler!
at injectionError (core.es5.js:1169) at noProviderError (core.es5.js:1207) at ReflectiveInjector_.webpackJsonp.../../../core/@angular/core.es5.js.ReflectiveInjector_.throwOrNull (core.es5.js:2649) at ReflectiveInjector.webpackJsonp.../../../core/@angular/core.es5.js.ReflectiveInjector_.getByKeyDefault (core.es5.js:2688) at ReflectiveInjector.webpackJsonp.../../../core/@angular/core.es5.js.ReflectiveInjector_.getByKey (core.es5.js:2620) at ReflectiveInjector.webpackJsonp.../../../core/@angular/core.es5.js.ReflectiveInjector_.get (core.es5.js:2489) at resolveNgModuleDep (core.es5.js:9475) at NgModuleRef_.webpackJsonp.../../../core/@angular/core.es5.js.NgModuleRef_.get (core.es5.js:10557) at resolveDep (core.es5.js:11060) at createClass (core.es5.js:10924)
請更正標籤 – Kukeltje
添加Domhandler爲供應商 – Vignesh