I am trying to get html textbox element using renderer2 service of angular/core to manipulate it.Although my code is not giving any error but it stops executing during execution on the line in which I am trying to get that element.that is -this.renderer.selectRootElement('#0', true).focus();
It is also setting up id of that text element as 0 which I am doing in initial lines.
Code begins from here--`private focusOnTextbox(){
const inputElements = this.el.nativeElement.querySelectorAll('input');// Set ID for each input elementinputElements.forEach((element: HTMLElement, index: number) => { const id = index.toString(); this.renderer.setAttribute(element, 'id', id);});// Focus the input with id '0'this.renderer.selectRootElement('#0', true).focus();}
`