# angular2-html-template-loader

> A webpack loader for angular2 html template strings

Latest version **0.1.1** (published 2016-11-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install angular2-html-template-loader
pnpm add angular2-html-template-loader
yarn add angular2-html-template-loader
bun add angular2-html-template-loader
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.1 |
| Published | 2016-11-09 |
| First published | 2016-11-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 (+2 in 2 direct dependencies) |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Quramy |
| Maintainers | wacul |
| Keywords | angular, webpack, html, loader |

## Links

- npm: https://www.npmjs.com/package/angular2-html-template-loader
- Repository: https://github.com/wacul/angular2-html-template-loader
- Homepage: https://github.com/wacul/angular2-html-template-loader#readme
- Issues: https://github.com/wacul/angular2-html-template-loader/issues
- npm.io page: https://npm.io/package/angular2-html-template-loader

## Dependencies (3)

- [mocha](https://npm.io/package/mocha.md) ^3.1.2
- [loader-utils](https://npm.io/package/loader-utils.md) ^0.2.16
- [html-minifier](https://npm.io/package/html-minifier.md) ^3.1.1

## Alternatives

- [@tsparticles/shape-image](https://npm.io/package/@tsparticles/shape-image.md) — 303.7K weekly downloads
- [@tsparticles/shape-line](https://npm.io/package/@tsparticles/shape-line.md) — 233.7K weekly downloads
- [stringify-attributes](https://npm.io/package/stringify-attributes.md) — 58.6K weekly downloads
- [mobile-drag-drop](https://npm.io/package/mobile-drag-drop.md) — 46.3K weekly downloads
- [@comunica/actor-rdf-parse-html](https://npm.io/package/@comunica/actor-rdf-parse-html.md) — 29.2K weekly downloads

## Recent versions

- 0.1.1 (latest) — 2016-11-09
- 0.1.0 — 2016-11-09
- 0.0.2 — 2016-11-09
- 0.0.1 — 2016-11-09

## README

# angular2-html-template-loader

A webpack loader which minify html template strings in your angular2 component code.

INPUT: 

```ts
@Component({
  selector: "my-component",
  template: `
    <div>
      Hello, wolrd
    </div>
  `
})
export class MyComponent
```

OUTPUT: 

```ts
@Component({
  selector: "my-component",
  template: `<div>Hello, wolrd</div>`
})
export class MyComponent
```

## Options

You can pass [html-minifier](https://github.com/kangax/html-minifier#options-quick-reference) options to this loader by writing them as a query string:

```js
module: {
  loaders: [
    {
      test: /\.component\.ts$/,
      exclude: /node_modules/,
      loader: "ts!angular2-html-template?collapseWhitespace=true"
    }
  ]
}
```

To preserve camel-cased attribute names(e.g. `*ngIf`), this loader turn the `caseSensitive` option `true` by the default.

## License
This software is released under the MIT License, see LICENSE.txt.

---
_Source: https://npm.io/package/angular2-html-template-loader · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
