(function() { 'use strict'; angular.module('ionic.ui.loading', []) .directive('loading', function() { return { restrict: 'E', replace: true, transclude: true, link: function($scope, $element){ $scope.$on('$destroy', function() { $element.remove(); }); $element.addClass($scope.animation || ''); }, template: '