Skip to content
Advertisement

Tag: angular

How to filter numbers in a drop down list?

I have an HTML table with a numeric variable called statut. The statut variable is a drop-down list, it has two values -> 1 and 9. The method in typescript seems to be correct I think my problem is the HTML, how to make the HTML know that it must filter a number and not a string? Thank you for

Javascript How to update all Property Names in nested object

I would like to return a new object with the updated property names in the nested object. For example in the fakeData below, I would like to update all the property names from: The data that I am trying to update : So far I’ve tried to use the recurrsion to do this but the subtask are not updating correctly

api endpoint progress loading

How do create a progress loader that is based on the uploadFile method/service , for example on the method below it should show keep loading unless the uploadFile is success , what is needed to and to be considered? should a finalize(() be added ? Thanks. #html code #tscode Answer You can have a flag called uploadInProgress and set that

ViewChild is undefined in angular 13

I am trying to call view child of a child component from parent and getting undefined in the console. see the image also see the stack blaze for the same https://stackblitz.com/edit/angular-ivy-k4m2hp?file=src%2Fapp%2Fhello.component.ts Please help to get the child component this.testChildComponent So that i can call ngOnInit of child from parent. this.testChildComponent.ngOnInit() Answer if you set your viewChild { static: true }

How to sort the string of date format in an array

Input output 22 March 2015, 09 May 2015, 18 August 2015, 25 December 2015, 25 jun 2016 Answer Subtracting 2 dates returns the difference between the two dates in milliseconds if a date is smaller than b returns negative values a will sorted to be a lower index than b.

Advertisement