Source: party/load.js

// Generated by CoffeeScript 1.12.7

/**
 * Text to indicate a part is being loaded
 * @module
 */
'use strict';
app.directive('loadParty', [
  'modelService', function(models) {
    return {
      restrict: 'A',
      transclude: 'element',
      priority: 500,
      scope: true,
      link: function($scope, $element, $attrs, ctrl, $transclude) {
        var id, loading;
        id = $scope.$eval($attrs.loadParty);
        loading = $('<span class="load"/>');
        loading.text('[loading party ' + id + ']');
        $element.replaceWith(loading);
        models.Party.get(id).then(function(party) {
          $scope.party = party;
          $transclude($scope, function(clone) {
            loading.replaceWith(clone);
          });
        });
      }
    };
  }
]);

//# sourceMappingURL=load.js.map