The first control on my page needs to have input focus when the page initially loads, unfortunately, in my case, that control is an ng-select.
So, somewhere in my ang2 template:
<ng-select id="mySelect" class="form-control" [options]="_myOptions" [(ngModel)]="model.SelectId" *ngIf=initDone' name=" mySelect" style="z-index: 10">
</ng-select>
In my ngAfterViewInit, I have:
$("#mySelect > div").focus();
$("#mySelect > div").select();
(Also tried dropping the div)
Alas, this is not working.
Note: This is NOT a duplicate of "What is the easiest way to put a default focus on an element in AngularJS". That question is referring to an input control, so basic jquery focus/select works. This is specifically referring to an ng-select (which render as a bunch children div's).