Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

angular-template-url-loader

maksim-tolo391MIT2.0.0

AngularJS webpack loader that inlines your templates into angular directives and components.

webpack, angular, angularjs, loader, angular-loader

readme

angular-template-url-loader

AngularJS webpack loader that inlines your templates into angular directives and components.

Installation

npm install angular-template-url-loader --save-dev

Usage

webpack.config.js

module.exports = {
  module: {
    rules: [
      {
        test: /\.js$/,
        use: [ 'angular-template-url-loader' ]
      },
      {
        test: /\.html$/, 
        use: [ 'raw-loader' ]
      }
    ]
  }
}

Options

Name Default Description
basePath '' Path to resolve URLs

Requirements

To be able to use the template loader you must have a loader registered, which can handle .html files (for example raw-loader or html-loader).

changelog

Changelog

2.0.0 Monday November 5 2018

  • #6 Upgrade loader-utils
  • Breaking: target Node 6 and newer