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.9
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

angular-tpl2js

Inject AngularJS directive templates as inline JavaScript

Build Status NPM Version Dependency Status devDependency Status Coverage Climate

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

FAQs

Package last updated on 13 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