16 lines
349 B
JavaScript
16 lines
349 B
JavaScript
angular
|
|
.module('app')
|
|
.directive( 'elemReady', function( $parse ) {
|
|
return {
|
|
restrict: 'A',
|
|
link: function( $scope, elem, attrs ) {
|
|
elem.ready(function(){
|
|
$scope.$apply(function(){
|
|
var func = $parse(attrs.elemReady);
|
|
func($scope);
|
|
})
|
|
})
|
|
}
|
|
}
|
|
})
|