angular-templatecache-extract

1.1.1 • Public • Published

angular-templatecache-extract

Extract html from Angular's templateCache statements.

Installation

This package is avalable from npm

npm i angular-templatecache-extract --save

Usage

// your angular code
var myApp = angular.module('myApp', []);
myApp.run(function ($templateCache) {
  $templateCache.put('template1.html', '<div>Test1</div>');
  $templateCache.put('template2.html', '<div>Test2' + '</div>');
});
import angularTemplatecacheExtract from 'angular-templatecache-extract';
import fs from 'fs';

fs.readFile(`${__dirname}/angularapp.js`, file => {
  angularTemplatecacheExtract(file.toString()).then(result => {
    console.log(result);
    // ['<div>Test1</div>', '<div>Test2</div>']
  });
});

Package Sidebar

Install

npm i angular-templatecache-extract

Weekly Downloads

16

Version

1.1.1

License

ISC

Unpacked Size

4.61 kB

Total Files

6

Last publish

Collaborators

  • anton.nesterov