1.0.0 • Published 7 years ago

angular-tpl2js v1.0.0

Weekly downloads
4
License
MIT
Repository
github
Last release
7 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

7 years ago

0.0.10

8 years ago

0.0.9

8 years ago

0.0.8

8 years ago

0.0.7

8 years ago

0.0.6

8 years ago

0.0.5

8 years ago

0.0.4

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago