Open stevermeister opened 7 years ago
I've tried to fix this for myself, feel free to take a look here: https://github.com/sebastianhaas/angular2-cookie/tree/fix-aot-compile
I added a CookieModule
which you can import in your module. It will provide the CookieService
. If you want to try, run npm run build && npm pack
on my branch and install from there.
However, I don't have much experience with gulp nor time to figure out the rather complex setup of this project to prepare it as a PR atm :(
@sebastianhaas thank you, you helped me a lot with link to same issue.
I've implemented this approach:
export function cookieServiceFactory(): CookieService {
return new CookieService();
}
I still would be nice to have solution for box.
It will be in the next version, which I plan to release this weekend.
@salemdar I really appreciate if you could fix this sooner.
You may want to check out salemdar/ngx-cookie.
Thanks @sebastianhaas! salemdar/ngx-cookie solved the problem.
@salemdar @sebastianhaas does this mean that 'ngx-cookie' will be supported in future and we can move from 'angular2-cookie' to 'ngx-cookie'? (indicating 'angular2-cookie' is dead )
I am using 'ngx-cookie' instead of 'angular2-cookie' and i get same error.
I have this error when testing with Karma/Jasmine.
Typescript Error
Module '"node_modules/angular2-cookie/services/cookie-options-args.model"' has no exported member 'CookieOptions'.
For AOT compilation I'm getting such error.