ng-easycommerce 0.0.529 → 0.0.530

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.
package/README.md CHANGED
@@ -1,3 +1,5 @@
1
+ # version 0.0.530
2
+ - pruebas meta og
1
3
  # version 0.0.529
2
4
  - ajustes en metodos de envío OCA
3
5
  # version 0.0.528
@@ -10139,17 +10139,11 @@
10139
10139
  window.scroll(0, 0);
10140
10140
  _this.breadcrumb = _this.optionsService.getBreadcrumb(_this.product.category);
10141
10141
  if (_this.product.name) {
10142
- _this.meta.removeTag('name="og:title"');
10143
- _this.meta.removeTag('name="og:description"');
10144
- _this.meta.removeTag('name="og:image"');
10145
- _this.meta.removeTag('name="og:type"');
10146
- _this.meta.removeTag('name="og:url"');
10147
- // console.log(this.product);
10148
- _this.meta.addTag({ name: 'og:title', content: _this.product.name });
10149
- _this.meta.addTag({ name: 'og:description', content: _this.product.description });
10150
- _this.meta.addTag({ name: 'og:image', content: _this.consts.mediaUrl() + _this.product.picturesdefault[0] });
10151
- _this.meta.addTag({ name: 'og:type', content: 'product' });
10152
- _this.meta.addTag({ name: 'og:url', content: window.location.href });
10142
+ _this.meta.updateTag({ property: 'og:title', content: _this.product.name });
10143
+ _this.meta.updateTag({ property: 'og:description', content: _this.deleteHTML(_this.product.description) });
10144
+ _this.meta.updateTag({ property: 'og:image', content: _this.consts.mediaUrl() + _this.product.picturesdefault[0] });
10145
+ _this.meta.updateTag({ property: 'og:type', content: 'product' });
10146
+ _this.meta.updateTag({ property: 'og:url', content: window.location.href });
10153
10147
  }
10154
10148
  });
10155
10149
  _this.productService.product$.pipe(operators.filter(function (data) { return data && data.id && data.id != 0; })).subscribe(function (productParam) {
@@ -10159,6 +10153,12 @@
10159
10153
  _this.ecOnConstruct();
10160
10154
  return _this;
10161
10155
  }
10156
+ ProductDetailEcComponent.prototype.deleteHTML = function (cadena) {
10157
+ // Expresión regular para buscar etiquetas HTML
10158
+ var expresionRegular = /<[^>]*>/g;
10159
+ // Reemplaza todas las etiquetas HTML por una cadena vacía
10160
+ return cadena.replace(expresionRegular, '');
10161
+ };
10162
10162
  ProductDetailEcComponent.prototype.ngOnInit = function () {
10163
10163
  this.ecOnInit();
10164
10164
  };