Angular 2 auto focus Angular 2 directive for auto focusing on inputs and text area npm install --save ng2focus In your template: <input type="text" ng2focus>