Following is my code snippet in which I need to focus an input field on the basis of checkbox value, If I check the checkbox it should focus the second element which somehow not working. Let me know what i am doing wrong here with Angular.
Note - I already checked few examples using directives, but I want to know what I am missing here concept/code etc
<input type="checkbox" ng-model="vm.check" />
<br>
<input type="text" ng-model="vm.input1" />
<input type="text" ng-model="vm.input2" ng-focus="vm.check" />
<input type="text" ng-model="vm.input3" />
Plnkr Code - http://plnkr.co/edit/q15Jht9AsVj60xrutVfm?p=preview