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