ng-smn-ui 4.2.3 → 4.2.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1202,13 +1202,16 @@
1202
1202
  UiCookie.delete = function (name) {
1203
1203
  this.set(name, '', -1);
1204
1204
  };
1205
- UiCookie.set = function (name, value, expireDays, path) {
1205
+ UiCookie.set = function (name, value, expireDays, path, domain) {
1206
1206
  if (expireDays === void 0) { expireDays = 365; }
1207
1207
  if (path === void 0) { path = '/'; }
1208
+ if (domain === void 0) { domain = ''; }
1208
1209
  var d = new Date();
1209
1210
  d.setTime(d.getTime() + expireDays * 24 * 60 * 60 * 1000);
1210
1211
  var expires = 'expires=' + d.toUTCString();
1211
- document.cookie = name + '=' + value + '; ' + expires + '; path=' + path;
1212
+ if (domain)
1213
+ domain = '; domain=' + domain;
1214
+ document.cookie = name + '=' + value + '; ' + expires + '; path=' + path + domain;
1212
1215
  };
1213
1216
  UiCookie = __decorate([
1214
1217
  core.Injectable()