Category : typescript

I have this JSON [ { Id: "14", Title: "HR Europe", Description: "HR Europe", Color: "3B23FF", Contents: [ { Id: "15", Title: "W.I.D.E Experience", Description: "Discover our Value!", Date: new Date(‘2019-12-02’), Type: "content", }, { Id: "17", Title: Experience", Description: "Discover our Value!", Date: new Date(‘2019-12-02’), Type: "content", } ] }, { Id: "12", Title: ..

Read more

I use exhaustMap in angular login app. I have next flow: Send username and password to api Fetch token from reponse and save it on localstorage Return user data if token saved.. In my code it looks like this.. login(email: string, password: string) { const reqUrl = `${environment.api_url}${this.usersLoginsEndpoint}`; this.url = `${reqUrl}`; const type = authProviders.Cognito; ..

Read more

I want to write the test case for Service class. My Service Class dynamic-form.service.ts import { HttpClient, HttpBackend } from ‘@angular/common/http’; import { Injectable } from ‘@angular/core’; import { Router } from ‘@angular/router’; @Injectable({ providedIn: ‘root’ }) export class DynamicFormService { private http: HttpClient; constructor(private handler: HttpBackend ) { this.http = new HttpClient(handler); } async ..

Read more

I’m using angular 11. I want to disable radio button with condition but it not working. It always enable event meet the condition. I don’t have any idea how to solve it. This my example code. HTML <div class="wizard mt-5"> <div class="wizard-inner"> <ul class="border-0 justify-content-between nav nav-tabs"> <div class="connecting-line"></div> <li class="active text-left"> <a> <!– {{vehicleInformation?.marketValue}} ..

Read more

in the below posted code i am trying to access the e.coordinate from outside the callback listener this.map.on(‘pointermove’…) as shown below. to achieve that i used binding as follows: this.mousePointerLonLat = this.map.on.bind(this.mousePointerLonLat) but the below mentioned logs showed the followin: console.log("this.mousePointerLonLat: ", this.mousePointerLonLat); =>this.mousePointerLonLat[0]: ƒ (type, listener) { if (Array.isArray(type)) { var len = type.length; ..

Read more

i have added custom font to jspdf as below : pdf.addFileToVFS(‘ArialUnicodeMS.ttf’, base64data.replace(‘data:font/ttf;base64,’, ”)); pdf.addFont(‘ArialUnicodeMS.ttf’, fontName, ‘normal’); pdf.setFont(fontName); it is working fine on browser but not on ipad giving error r.metadata.unicode.widths in getcharwidthArray() version used: "jspdf": "2.3.1", Source: Angular..

Read more

in the below posted code i am trying to access the e.coordinate from outside the callback listener this.map.on(‘pointermove’…) as shown below. the method routeToField() is invoked on a button click. inside this method i am trying to access the values of this.mousePointerLonLat. the log statement inside the callback listener this.map.on(…) are displayed and contain values ..

Read more