Skip to content

prasanthkarukkuvel/AngularTyping

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 

Repository files navigation

Angular-typing

Simple angular version of JQuery Typing allows to bind callbacks for started and stopped typing events. No dependency for JQuery 😉

Example

Module

Include module angular-typing to your app

angular.module(..., ['angular-typing'])

HTML

Add the directive to your textbox

<div ng-controller="typeController as ctrl">
	<input type="text" typing type-delay="400" type-start="ctrl.typeStart(value)" type-end="ctrl.typeEnd(value)" />
</div>
  • typing - directive, can be used as an attribute or as a class

  • type-delay - the amount of time taken to trigger type-end after the user stops typing. Default value is 400ms.

  • type-start - callback function triggered when the user starts typing.

  • type-end - callback function triggered after the user stops typing which inlcudes the type-delay.

Controller

Initialize type start and end functions in your controller

angular.module(...).controller("typeController",[..., function() {
	this.typeStart = function(value) { 
		... 
	}

	this.typeEnd = function(value) {
		// update model, send server request etc..
		...
	}
}]);

Demo

Download Link. Live demo coming soon. 😁

License

This plugin is available under the MIT license.

About

Angular Typing plugin inspired from JQuery Typing

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published