Skip to content

An angular directive to easily apply focus on an element through the use of events

License

Notifications You must be signed in to change notification settings

kfuchs/angular-focus-on

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

angular-focus-on

A simple angularjs directive to set focus on an element through the use of events.

Getting Started

You can choose one of:

  • via Bower: by running $ bower install angular-focus-on from your console
  • download the minified file.

Simple Example

Below is a quick example showing the usage, you can also see an examples in the demo directory.

simple demo

<div ng-controller="focusCtrl">
  <input focus-on event="itemSelected">
  <button ng-click="selectItem()">You should select this item</button>
</div>
angular.module('yourApp', ['kf.focusOn'])

    .controller('focusCtrl', ['$scope', function($scope) {
        $scope.selectItem() = function() {
            $scope.$broadcast('itemSelected');
        };
    }]);

TODO's

License === MIT

About

An angular directive to easily apply focus on an element through the use of events

Resources

License

Stars

Watchers

Forks

Packages

No packages published