Files
standardnotes-app-web/app/assets/javascripts/directives/functional/elemReady.ts
2020-04-13 08:27:10 -05:00

15 lines
336 B
TypeScript

/* @ngInject */
export function elemReady($parse: ng.IParseService) {
return {
restrict: 'A',
link: function($scope: ng.IScope, elem: JQLite, attrs: any) {
elem.ready(function() {
$scope.$apply(function() {
var func = $parse(attrs.elemReady);
func($scope);
});
});
}
};
}