Skip to main content

All Questions

-4 votes
1 answer
97 views

Compare Array of Objects with Object in ES6 [closed]

so basically I want to compare the object of array with another object and change its value. The data is fully dynamic so I can't use static keys. here is my data this new DATA is the one I want to ...
Owais Ahmed Khan's user avatar
0 votes
1 answer
47 views

How to destructing the array of object based on property name need to map the value

I have a below specified format of the response from server , i need to map the values based on fieldnames to the formcontrol names. let userForm= ths.formbuilder.group({ firstName:[], lastName:[],...
Mohamed Sahir's user avatar
0 votes
3 answers
161 views

How to get class function from a service that return a model

I'm having a class (userName) which its properties defined a model (casting from json). This class has also a simple function that return the full Name: export class userName { firstName: string; ...
Guy E's user avatar
  • 1,927
93 votes
16 answers
167k views

Angular: 7.2.1 ES6 class ReferenceError : Cannot access 'X' before initialization

I'm having the following TypeScript class export class Vehicule extends TrackableEntity { vehiculeId: number; constructor() { super(); return super.proxify(this); } } my typescript ...
user avatar
-1 votes
3 answers
387 views

Angular 6 ES6 initiate object arrays

I'm really new to javascript. I have a nested class structure where I need to initiate using a json object. My question is how can I initiate array of EventDate objects and assign to this.dates in ...
Achira Shamal's user avatar
2 votes
1 answer
2k views

Share and mutate object between different TypeScript classes

I have the following TypeScript code: class ClassA { options: ClassOption; B: ClassB; constructor() { this.B = new ClassB(this.options); this.changeOptions(); } ...
Vivek's user avatar
  • 493
0 votes
1 answer
412 views

angular2 http interceptor and inject SlimLoadingBarService does not work?

I write a http intercpetor,it is like this: import { Injectable, Inject } from '@angular/core'; import { SlimLoadingBarService } from 'ng2-slim-loading-bar'; // ... other imports in here @...
Wang Xiao's user avatar
  • 315
1 vote
1 answer
137 views

store state of member variable in angular 2 class

export class RSDLeadsComponent implements OnInit{ templateModel:RSDLeads = { "excludedRealStateDomains": [{"domain":""}], "leadAllocationConfigNotEditables": [{"attributeName":""}]...
ashish ghone's user avatar