BCJTI / ng2-cookies

Simple library to deal with cookies in Angular2
64 stars 31 forks source link

src/services/cookie.d.ts doesn't "support" secure parameter. #28

Closed dakipro closed 7 years ago

dakipro commented 7 years ago

Hi, could you perhaps update src/services/cookie.d.ts so that it supports Secure parameter? (not yet sure how to "properly" fix it myself, i would have asked for pull request myself) Thanks for the script btw!

Bigous commented 7 years ago

Hi @dakipro I didn't get it, the Cookie.set method already have the secure parameter. You can see it here

dakipro commented 7 years ago

yeah, sorry if I am confused a bit, still new to the angular/npm world. I installed the extension with "npm install ng2-cookies" in default angular-cli installation, and when I tried to use it Visual Studio Code and while compiling I got the error that parameter is missing in ng2-cookies/src/services/cookie.d.ts (notice the cookie.d.ts) I then added the last parameter to the line 27, so from static set(name: string, value: string, expires?: number, path?: string, domain?: string): void; it become

static set(name: string, value: string, expires?: number, path?: string, domain?: string, secure?: boolean): void;

everything was fine... not sure if this has something with the extension to do, or with npm or perhaps with my isntallation, but editing the cookie.d.ts helped

pkuninti commented 7 years ago

Which version has this fix? I'm pulling the version 1.0.3 and I don't see the fix there. But I do see that it is fixed in master branch.

dakipro commented 7 years ago

the "fix" is not tested yet, I just implemented it locally and it sort of works but I am not sure about how to properly test it so I didn't made a pull request yet

Bigous commented 7 years ago

Hi @carcamano , I think we missed the publication of version in which secure parameter is implemented... could you fix it? As I'm using it installing from github itself, I didn't notice the problem.

Bigous commented 7 years ago

v0.1.4 has the parameter.