angular-templates-brunch

Wrap all templates in an AngularJS module for Brunch.IO

Added by: Sam Deering

GitHub

Repository

kenhkan/angular-templates-brunch

Stats

Stars: 0

Watchers: 0

Forks: 6

Author

Kenneth Kan
Kenneth Kan

Module Description

Wrap templates in an AngularJS module for Brunch.IO
Dependency Status Stories in Ready

For each template, wrap around in a shared AngularJS module called appTemplates by default with each template file's path as the template URL. See $templateCache for more information.

Installation

npm install --save angular-templates-brunch

Usage

  1. Set joinTo attribute for templates in config.coffee, e.g.
templates:
  joinTo:
    'templates.js': /^app/
  1. In your markup, include templates.js:
<script type="text/javascript" src="/templates.js"></script>
  1. Your app module must require an appTemplates module:
angular.module('MyApp', [
  ...
  'appTemplates'
  ...
]);
  1. Get a particular template by its path.
$routeProvider.when('/home', { templateUrl: 'app/home/home.html' });
  1. Run Brunch (e.g. brunch build)!

Options

module

Specify the module to place the templates in

Default: appTemplates

plugins:
  ng_templates:
    module: 'MyModule'

Module stats last updated: 2015-04-28 11:07:46

Disclaimer: Some data on this page may have been gathered from the authors GitHub respository. If you see any mistakes or outdated information please let us know. Thanks!