Sha256: d14a00a0f227225a038e906237248b0d22431d1dba78ef3a6b253d43efb7f5d1

Contents?: true

Size: 543 Bytes

Versions: 8

Compression:

Stored size: 543 Bytes

Contents

/**
 * This directive replaces itself with a specialised type template based on the
 * type it is displaying.
 */
app.directive('typePlaceholder', function(templateFor, $stateParams) {
  return {
    restrict: 'EA',
    scope: {
      type: '=',
      template: '@',
      details: '=?',
      name: '=?'
    },
    link: function(scope, element) {
      scope.apiVersion = $stateParams.version;
      templateFor(scope.type, scope.template).then(function(templateFn) {
        element.replaceWith(templateFn(scope));
      });
    }
  };
});

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
praxis-0.21 lib/api_browser/app/js/directives/type_placeholder.js
praxis-0.20.1 lib/api_browser/app/js/directives/type_placeholder.js
praxis-0.20.0 lib/api_browser/app/js/directives/type_placeholder.js
praxis-0.19.0 lib/api_browser/app/js/directives/type_placeholder.js
praxis-0.18.1 lib/api_browser/app/js/directives/type_placeholder.js
praxis-0.18.0 lib/api_browser/app/js/directives/type_placeholder.js
praxis-0.17.1 lib/api_browser/app/js/directives/type_placeholder.js
praxis-0.17.0 lib/api_browser/app/js/directives/type_placeholder.js