I'm using the autofocus attribute for mdl-textfield, however after navigating to another page and returning to the target page, the focus on mdl-textfield is lost.
I tried this approach: Angular2 - Focusing a textbox on component load.
However it valid only for DOM elements such as .
I undrestood that if i want to get focus after navigating away and returning, I have to do it on ngAfterViewInit() method?
Any help, How can i do that?
Thanks