please see the jsfiddle link http://jsfiddle.net/ounsqcmt/55/
i had used autofocus as like this using angularjs
it is working in google but not working in mozilla firefox
The code is as
<div ng-app="App" ng-controller="AppCtrl ">
<form>
<input type="text" />
<input name="theInput" auto-focus />
</form>
</div>
var app = angular.module("App", []);
app.controller("AppCtrl", function($scope) {
})
app.directive('autoFocus', function($timeout) {
return {
restrict: 'AC',
link: function(_scope, _element) {
$timeout(function(){
_element[0].focus();
}, 0);
}
};
});
The above code is working in googlechrome and internet explorer...but not working in mozilla firefox..
please help me..
thanks in advance