Sha256: aae08cf9e59025f654fe2675ab218be429faf6ca3dfe2534058edab1dae0bce8
Contents?: true
Size: 668 Bytes
Versions: 8
Compression:
Stored size: 668 Bytes
Contents
app.directive('rsRequestBody', function($compile, PayloadTemplates) { return { restrict: 'E', scope: { payload: '=' }, link: function(scope, element, attrs) { // use the attribute type name to find the template var alt, name = (scope.payload.type ? scope.payload.type.name : null) || 'default'; if(scope.payload.type) { scope.attributes = scope.payload.type.attributes; } if(name === 'Struct') { name = 'PraxisBody', alt = 'Struct' } PayloadTemplates.resolve(name, alt).then(function(template) { element.replaceWith($compile(template)(scope)); }); } } });
Version data entries
8 entries across 8 versions & 1 rubygems