1.0.0 • Published 8 years ago

angular-tpl2js v1.0.0

Weekly downloads
4
License
MIT
Repository
github
Last release
8 years ago

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.

1.0.0

8 years ago

0.0.10

10 years ago

0.0.9

10 years ago

0.0.8

10 years ago

0.0.7

10 years ago

0.0.6

10 years ago

0.0.5

10 years ago

0.0.4

10 years ago

0.0.3

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago