angular-tpl2js
Convert Angular templates to inline JavaScript
Last updated 3 years ago by scniro .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install angular-tpl2js 
SYNC missed versions from official npm registry.

angular-tpl2js

Build Status NPM Version Dependency Status devDependency Status Coverage Climate

Inject AngularJS directive templates as inline JavaScript

Install

npm install angular-tpl2js --save-dev

API

inline(path, [config], callback)

let tpl2js = require('angular-tpl2js');

tpl2js.inline('/js/directive.js', function (err, result) {

  // directive.js with inline template
});

config

include for retrieving ng-include templates and HTMLMinifier, a relay for html-minifier options

// defaults
let config = {
  include: false,
  HTMLMinifier: {
    collapseWhitespace: true,
    removeComments: true
  }
}

tpl2js.inline('/js/directive.js', {include: true}, function (err, result) {

  // directive.js with inline template: ng-include parsed
});

Usage With Gulp

Please use the gulp-angular-tpl2js plugin for use with gulp.

Current Tags

  • 1.0.0                                ...           latest (3 years ago)

11 Versions

  • 1.0.0                                ...           3 years ago
  • 0.0.10                                ...           4 years ago
  • 0.0.9                                ...           4 years ago
  • 0.0.8                                ...           4 years ago
  • 0.0.7                                ...           4 years ago
  • 0.0.6                                ...           4 years ago
  • 0.0.5                                ...           4 years ago
  • 0.0.4                                ...           4 years ago
  • 0.0.3                                ...           4 years ago
  • 0.0.2                                ...           4 years ago
  • 0.0.1                                ...           4 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (3)
Dev Dependencies (5)
Dependents (1)

Copyright 2014 - 2016 © taobao.org |