Skip to content

Instantly share code, notes, and snippets.

View karlgoldstein's full-sized avatar

Karl Goldstein karlgoldstein

View GitHub Profile
@karlgoldstein
karlgoldstein / grunt-html2js.js
Created February 22, 2013 01:27
Grunt task (v. 0.4.0) for compiling AngularJS templates to JavaScript.
/**
* Generates JavaScript version of HTML templates for AngularJS as part of a Grunt build
*
* Allows for bundling into multiple collections, for applications that are distributed across more than one page.
*
* Usage (in grunt.initConfig):
*
* html2js: {
* firstTemplateCollection: {
* src: ['<%= src.first %>'],