{"library":"ngtemplate-loader","title":"ngtemplate-loader","description":"Webpack loader that bundles AngularJS templates into the JavaScript bundle and pre-populates the $templateCache, eliminating initial load time for templates. Version 2.1.0 is stable, with maintenance releases on GitHub. Key differentiators: it does not minify/process HTML, instead working with html-loader or raw-loader for flexibility; supports parameter interpolation via webpack loader-utils; handles module, relativeTo, prefix, and pathSep options for path customization.","language":"javascript","status":"active","last_verified":"Sat Apr 25","install":{"commands":["npm install ngtemplate-loader"],"cli":null},"imports":["import template from 'ngtemplate!html!./file.html';"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"// webpack.config.js\nmodule.exports = {\n  module: {\n    rules: [\n      {\n        test: /\\.html$/,\n        use: [\n          { loader: 'ngtemplate-loader', options: { relativeTo: 'src/' } },\n          { loader: 'html-loader' }\n        ]\n      }\n    ]\n  }\n};\n\n// In your AngularJS directive\napp.directive('myDirective', function() {\n  return {\n    restrict: 'E',\n    templateUrl: require('ngtemplate!html!./template.html')\n  };\n});","lang":"javascript","description":"Shows webpack configuration to load .html files with ngtemplate-loader and html-loader, and usage in an AngularJS directive via require.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}