Files
brewman/brewman/static/app/common/fadey.directive.ts
tanshu f3c1bfa57b - Started using TypeScript
- Using SystemJS as Module Loader
 - Auth and Permissions moved to Credentials.service from $rootScope
 - Toasts moved to Messages.service
 - Massive Changes
 - Sprint 1 done to move to Angular.io from AngularJS
 - Should be fully working!! :)
2018-05-15 00:11:28 +05:30

21 lines
540 B
TypeScript

import * as $ from 'jquery';
export function Fadey() {
return {
restrict: 'A',
link: function (scope, element, attrs) {
const duration = 500;
element = $(element);
element.hide();
element.fadeIn(duration);
scope.destroy = function (complete) {
element.fadeOut(duration, function () {
if (complete) {
complete.apply(scope);
}
});
};
}
};
}