Closed willypuzzle closed 8 years ago
Hey @willypuzzle
The usage examples are actually intended for final releases. Could you show me your systemjs (or webpack) configuration?
Best regards, Samet
I use this webpack https://github.com/AngularClass/angular2-webpack-starter I modified only the src
I am having this same issue after upgrading to angular 2.1.0-rc.1
Same issue. Any update on this?
This will get rid of the exception 'No provider for CookieOptions'
Add CookieOptions in your import statement like import { CookieService, CookieOptions } from 'angular2-cookie';
and then add both CookieService and CookieOptions in your Root Module's provider array.
But after doing this i get another exception Can't resolve all parameters for CookieOptions: (?).
can anyone help in regarding this issue.
I have just updated the version to 1.2.5. All tests pass with angular 2.1.0.
I'm still getting this error in 1.2.5! Using https://github.com/AngularClass/angular2-webpack-starter
In vendors
// angular2 cookie
import 'angular2-cookie/core'
module
import { CookieService } from 'angular2-cookie/core';
providers: [
xx,
CookieService
]
component
import { CookieService } from 'angular2-cookie/core';
constructor(
private fb: FormBuilder,
private xx: xxxx,
private cookieService: CookieService
) {
super();
}
@salemdar can u look into it?
same error
I'm facing this problem with the latest version. By the way, I'm using with angular2-webpack.
1.2.5 is working! if I upgrade my project to angular 2.2.0 (
app.module.js:
...
import { CookieService } from 'angular2-cookie/core';
...
@NgModule({
...
providers: [
CookieService
],
bootstrap: [AppComponent]
})
...
vendor.ts:
...
import 'angular2-cookie/core';
...
custom.service.js:
...
import { CookieService } from 'angular2-cookie/core';
...
constructor(private cookieService:CookieService) {
}
...
I'm using 2.2.1, and it's not.
I'm still getting this error in 1.2.5 ,angular 2.2.0 and webpack 2.1.0-beta.25
I am using angular-cli (1.0.0-beta.24) with angular2-cookie(1.2.6) and am getting this error only when I do an AOT build.
ng serve --> this works ng serve -prod -->this works ng serve -aot -->this does NOT work: Error: No provider for CookieOptions! ng serve -prod -aot -->this does NOT work: Error: No provider for CookieOptions!
For me, this error was because I had neglected to import the CookieModule.
There is no CookieModule
same error
I have the same issue as @nukuuk. I saw @salemdar uploaded a new version along time ago in another branch on gitHub, but for some reason I don't see it in NPM, so I can't use it. For now I just forced to use another package for cookies.
@igormap42 Did you try what I linked? It worked for me (and it seems to have worked for many people on that thread).
My code compile clean but I got this "No provider for CookieOptions!" exception when I try to execute the code.
NOTE: I read the installation instruction but they seems to be for older version of Angular2 (before rc-5). I have followed the new Angular 2 way for providers addition (the way after rc-5). For instance: