@wavemaker/app-ng-runtime 11.5.0-next.141082 → 11.5.0-next.141083

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.
@@ -1095,11 +1095,12 @@ class BaseComponent {
1095
1095
  const context = this.context || {};
1096
1096
  const parentContexts = this.inj.get(Context, {});
1097
1097
  // assign the context property accordingly
1098
- // if (this.viewParent !== context) {
1099
- // this.context = context;
1100
- // } else {
1101
- // this.context = {};
1102
- // }
1098
+ if (this.viewParent !== context) {
1099
+ this.context = context;
1100
+ }
1101
+ else {
1102
+ this.context = {};
1103
+ }
1103
1104
  if (parentContexts) {
1104
1105
  let parentContextObj = {};
1105
1106
  if (_.isArray(parentContexts)) {
@@ -1335,14 +1336,18 @@ class BaseComponent {
1335
1336
  * and our logic to check like these changes will fail. Before IVY changes, angular maintains a separate object with these attributes
1336
1337
  * as it is like in the camelcase. With IVY all those are gone. So need to maintain a separate list with the camelcasing of attributes
1337
1338
  * @private
1339
+ * _tNode.attrs attributes are stored in array(even index: key, odd index: value)
1338
1340
  */
1339
1341
  getAttributes() {
1340
1342
  let _tNodeAttrs = this.inj._tNode.attrs, actualAttrs = Array.from(this.nativeElement.attributes).map(attr => attr.name);
1341
1343
  if (_tNodeAttrs === null) {
1342
1344
  return actualAttrs;
1343
1345
  }
1344
- _tNodeAttrs.filter(attr => {
1345
- if (typeof attr === 'string') {
1346
+ _.forEach(_tNodeAttrs, (attr, i) => {
1347
+ if (typeof attr === 'number') {
1348
+ return false;
1349
+ }
1350
+ if (typeof attr === 'string' && i % 2 == 0) {
1346
1351
  let lowerCaseAttr = attr.toLowerCase();
1347
1352
  if (actualAttrs.includes(lowerCaseAttr)) {
1348
1353
  let index = actualAttrs.indexOf(lowerCaseAttr);