I have AppComponent class defined as
export class AppComponent {
@ViewChild('scheduleObj')
public scheduleObj!: ScheduleComponent;
----
---
private businessID : string = '999';
----
private currentTimeZone : string = 'Europe/London';
then I have constructor defined as
constructor() {
console.log("Constructor Called");
this.businessID = '12';
this.currentTimeZone = Intl.DateTimeFormat().resolvedOptions().timeZone;
}
Finally I have a Query Object which is passing data to backend APIs
private dataQuery: Query = new Query().from("Appointment").addParams('business_id', this.getBusinessID()).addParams('timezone',this.currentTimeZone);
When I check the Data received in the Backend, I can see this
body: '{"table":"Table1","params":{"location_id":"999","timezone":"Europe/London","StartDate":"2022-05-21T14:00:00.000Z","EndDate":"2022-05-28T14:00:00.000Z"},"location_id":"999","timezone":"Europe/London","StartDate":"2022-05-21T14:00:00.000Z","EndDate":"2022-05-28T14:00:00.000Z"}',
isBase64Encoded: false
so the values assigned in constructor is not passed to backend. Any clue as to what needs to be done in order to pass the values to goto backend