Skip to content

Commit

Permalink
Merge pull request #269 from dehypnosis/master
Browse files Browse the repository at this point in the history
update CookieBrowser set method to ensure path of cookie (pull request to dev)
  • Loading branch information
jonathan-casarrubias authored Dec 21, 2016
2 parents da75e19 + 408a870 commit 295759d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/angular2/shared/storage/cookie.browser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export class CookieBrowser {

set(key: string, value: any, expires?: Date) {
this.cookies[key] = value;
let cookie = `${key}=${value}${expires ? `; expires=${ expires.toUTCString() }` : ''}`;
let cookie = `${key}=${value}; path=/${expires ? `; expires=${ expires.toUTCString() }` : ''}`;
window.document.cookie = cookie;
}

Expand Down

0 comments on commit 295759d

Please sign in to comment.