I have a new Angular 2 app with a list of input
boxes. When the user hits the return key, I add a new input
box immediately after the one they\'re
Take a look at ViewChild, here's a example. This might be what you're looking for:
import {Component, ViewChild} from 'angular2/core'
@Component({
selector: 'my-app',
providers: [],
template: `
`,
directives: []
})
export class App {
@ViewChild('name') vc: ElementRef;
ngAfterViewInit() {
this.vc.nativeElement.focus();
}
}