我正在使用清晰度模块和我的 Angular 4 代码。使用他们的警报框示例时,我收到上述错误
示例代码
<div class="alert alert-info">
<div class="alert-items">
<div class="alert-item">
<div class="alert-icon-wrapper">
<clr-icon class="alert-icon" shape="info-circle"></clr-icon>
</div>
<span class="alert-text">...</span>
<div class="alert-actions">
<a href="..." class="alert-action">Acknowledge</a>
<a href="..." class="alert-action">Reset to green</a>
</div>
</div>
</div>
<button type="button" class="close" aria-label="Close">
<clr-icon aria-hidden="true" shape="close"></clr-icon>
</button>
</div>
错误堆栈详细信息
ERROR 错误:未捕获(承诺):错误:没有 AlertIconAndTypesService 的提供者!错误:没有 AlertIconAndTypesService 的提供者!在 ReflectiveInjector_.webpackJsonp.../../../core/@angular/core.es5.js.ReflectiveInjector_ 处的 injectionError (core.es5.js:1169) 处的 noProviderError (core.es5.js:1207)。throwOrNull (core.es5.js:2649) 在 ReflectiveInjector .webpackJsonp.../../../core/@angular/core.es5.js.ReflectiveInjector_。GetByKeyDefault (core.es5.js:2688) 在 ReflectiveInjector .webpackJsonp.../../../core/@angular/core.es5.js.ReflectiveInjector_。ReflectiveInjector 的 getByKey (core.es5.js:2620).webpackJsonp.../../../core/@angular/core.es5.js.ReflectiveInjector_.get (core.es5.js:2489) 在 resolveNgModuleDep (core.es5.js:9475) 在 NgModuleRef_.webpackJsonp .../../../core/@angular/core.es5.js.NgModuleRef_.get (core.es5.js:10557) 在 resolveDep (core.es5.js:11060) 在 createClass (core.es5 .js:10913) in 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) 在 ReflectiveInjector .webpackJsonp.../../../core/@angular/core.es5.js.ReflectiveInjector_。GetByKeyDefault (core.es5.js:2688) 在 ReflectiveInjector .webpackJsonp.../../../core/@angular/core.es5.js.ReflectiveInjector_。ReflectiveInjector 的 getByKey (core.es5.js:2620).webpackJsonp.../../../core/@angular/core.es5.js.ReflectiveInjector_.get (core.es5.js:2489) 在 resolveNgModuleDep (core.es5.js:9475) 在 NgModuleRef_.webpackJsonp .../../../core/@angular/core.es5.js.NgModuleRef_.get (core.es5.js:10557) 在 resolveDep (core.es5.js:11060) 在 createClass (core.es5 .js:10913) 在 resolvePromise (polyfills.bundle.js:3328) 在 resolvePromise (polyfills.bundle.js:3299) 在 polyfills.bundle.js:3376 在 ZoneDelegate.webpackJsonp.../../../。 ./zone.js/dist/zone.js.ZoneDelegate.invokeTask (polyfills.bundle.js:2969) 在 Object.onInvokeTask (core.es5.js:3881) 在 ZoneDelegate.webpackJsonp.../../.. /../zone.js/dist/zone.js.ZoneDelegate.invokeTask (polyfills.bundle.js:2968) 在 Zone.webpackJsonp.../../../../zone.js/dist/zone .js.Zone.runTask (polyfills.bundle.js:2736) 在 drainMicroTaskQueue (polyfills.bundle.js:3140) 在