Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

angular-tpl2js

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

angular-tpl2js

Convert Angular templates to inline JavaScript

  • 0.0.10
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
4
increased by33.33%
Maintainers
1
Weekly downloads
 
Created
Source

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)

var 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
var 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
});

Use With Gulp

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

FAQs

Package last updated on 27 Apr 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc