我想在使用Angular CLI建立的Angular 4应用程序中使用ngx-cookie consent包。我没有systemjs文件。因此,除了那一部分之外,我按照文档中的每个步骤进行了操作(https://tinesoft.github.io/ngx-cookieconsent/doc/index.html)。 我收到了4条错误信息。
two errors with following message
//Cannot read property 'initialise' of undefined at //NgcCookieConsentService.init (cookieconsent.service.js:53) //at new NgcCookieConsentService (cookieconsent.service.js:23) //at _createClass (core.es5.js:9532) //at createProviderInstance$1 (core.es5.js:9500) //at resolveNgModuleDep (core.es5.js:948 5) //at NgModuleRef.get (core.es5.js:10577) //at resolveDep (core.es5.js:11080) //at createClass (core.es5.js:10933) //at createDirectiveInstance (core.es5.js:10764) //at createViewNodes (core.es5.js:12212)
- Cannot find name 'NgcInitializeEvent'. Cannot find name 'NgcStatusChangeEvent'.
Please help.
@NgModule
的imports: [NgcCookieConsentModule.forRoot(cookieConfig), ...],
部分了吗? - angularrocks.com