ngx-cookie-service does not work on Angular 12 with Ivy Compiler
dgates82 opened this issue ยท 5 comments
Describe the bug
When attempting to use ngx-cookie-service with Angular 12 it produces compiler errors:
This is when using either version 12.0.3 or 13.2.1 of the ngx-cookie-service
Steps to Reproduce
npm i ngx-cookie-service@12.0.3
Import CookieService in app.module.ts
ng build
Please provide a link to a minimal reproduction of the bug. StackBlitz, CodePen or CodeSanBox
Pending
Expected behaviour
ngx-cookie-service version 12 should be compatible with angular 12 with ivy enabled since that is now the default compiler and View Engine is no longer supported
What version of the library you see this issue?
12.0.3
What version of Angular are you using?
Angular 12
Screenshots
No response
Desktop? Please complete the following information
No response
Mobile? Please complete the following information
No response
Anything else?
No response
Hello ๐ @dgates82
Thank you for raising an issue. We will investigate into the issue and get back to you as soon as possible. Please make sure you have given us as much context as possible.
Feel free to raise a PR if you can fix the issue
@dgates82 can you send us reproducible repo in StackBlitz?
@pavankjadda , I'll try to reproduce in StackBlitz this evening and send over the link
@pavankjadda , here is the link to the StackBlitz with the error.
https://stackblitz.com/edit/angular-ivy-zd6j17?file=package.json,src%2Fapp%2Fapp.component.ts,src%2Fapp%2Fapp.module.ts
Thanks
@pavankjadda , here is the link to the StackBlitz with the error. https://stackblitz.com/edit/angular-ivy-zd6j17?file=package.json,src%2Fapp%2Fapp.component.ts,src%2Fapp%2Fapp.module.ts
Thanks
You should provide CookieService
under providers
@NgModule({
imports: [BrowserModule, FormsModule],
declarations: [AppComponent, HelloComponent],
bootstrap: [AppComponent],
providers: [CookieService],
})
export class AppModule {}