Sha256: 659313067935a5b89c49d3477624d857a3c289f041c7b77fb3a777a7beef8a4f

Contents?: true

Size: 349 Bytes

Versions: 12

Compression:

Stored size: 349 Bytes

Contents

app.filter('attributeName', function($sce) {
  return function(input) {
    var parts = input.split('.');
    if (parts.length > 1) {
      var prefix = _.take(parts, parts.length-1).join('.');
      return $sce.trustAsHtml('<span class="attribute-prefix">' + prefix + '.</span>' + _.last(parts));
    }
    return $sce.trustAsHtml(input);
  };
});

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
praxis-2.0.pre.9 lib/api_browser/app/js/filters/attribute_name.js
praxis-2.0.pre.8 lib/api_browser/app/js/filters/attribute_name.js
praxis-2.0.pre.7 lib/api_browser/app/js/filters/attribute_name.js
praxis-2.0.pre.6 lib/api_browser/app/js/filters/attribute_name.js
praxis-2.0.pre.5 lib/api_browser/app/js/filters/attribute_name.js
praxis-2.0.pre.4 lib/api_browser/app/js/filters/attribute_name.js
praxis-2.0.pre.3 lib/api_browser/app/js/filters/attribute_name.js
praxis-2.0.pre.2 lib/api_browser/app/js/filters/attribute_name.js
praxis-2.0.pre.1 lib/api_browser/app/js/filters/attribute_name.js
praxis-0.22.pre.2 lib/api_browser/app/js/filters/attribute_name.js
praxis-0.22.pre.1 lib/api_browser/app/js/filters/attribute_name.js
praxis-0.21 lib/api_browser/app/js/filters/attribute_name.js