todomvc
Version:
> Helping you select an MV\* framework
16 lines (14 loc) • 438 B
text/typescript
/// <reference path='../_all.ts' />
module todos {
'use strict';
/**
* Directive that executes an expression when the element it is applied to loses focus.
*/
export function todoBlur(): ng.IDirective {
return {
link: ($scope: ng.IScope, element: JQuery, attributes: any) => {
element.bind('blur', () => { $scope.$apply(attributes.todoBlur); });
}
};
}
}