mirror of
https://github.com/taobataoma/meanTorrent.git
synced 2026-01-16 12:22:26 +01:00
24 lines
423 B
JavaScript
24 lines
423 B
JavaScript
(function () {
|
|
'use strict';
|
|
|
|
angular.module('core')
|
|
.directive('mtScroll', mtScroll);
|
|
|
|
function mtScroll() {
|
|
var directive = {
|
|
restrict: 'A',
|
|
link: link
|
|
};
|
|
|
|
return directive;
|
|
|
|
function link(scope, element, attrs) {
|
|
if (attrs.mtScroll) {
|
|
$(element).on('scroll', function (evt) {
|
|
scope.$eval(attrs.mtScroll, {$event: event});
|
|
});
|
|
}
|
|
}
|
|
}
|
|
}());
|