AngularJS: Enfocar cursor dinamicamente en un input

  • Autor Autor peterdeveloper
  • Fecha de inicio Fecha de inicio
P

peterdeveloper

Alguien me puede ayudar, necesito enfocar el cursor en un input cada vez que agrego un item desde angular.
Html:
<button ng-click="addPlan()">Add</button>
<tr ng-repeat="Plan in PlanAction">
<td><input type="text" ng-model="Plan.Descripcion" /></td>
</tr>

AngularJS:

$scope.addPlan = function () {
var item={Id:0, Descripcion:''}
$scope.PlanAction.push(item);
}
 
Atrás
Arriba