# @angularclass/conventions-loader

> Allow default for @Component metadata for Angular 2

Latest version **1.0.13** (published 2016-11-07) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install @angularclass/conventions-loader
pnpm add @angularclass/conventions-loader
yarn add @angularclass/conventions-loader
bun add @angularclass/conventions-loader
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.13 |
| Published | 2016-11-07 |
| First published | 2016-07-30 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 15 |
| Author | PatrickJS |
| Maintainers | andytjoslin, angularclass-npm, gdi2290, hendrixer |
| Keywords | angular2, webpack, angularjs, loader, angular2-loader, angular2-conventions-loader, AngularClass, AngularClassModules |

## Links

- npm: https://www.npmjs.com/package/@angularclass/conventions-loader
- Repository: https://github.com/angularclass/angular2-conventions-loader
- Homepage: https://github.com/angularclass/angular2-conventions-loader#readme
- Issues: https://github.com/angularclass/angular2-conventions-loader/issues
- npm.io page: https://npm.io/package/@angularclass/conventions-loader

## Dependencies (1)

- [loader-utils](https://npm.io/package/loader-utils.md) ^0.2.15

## Alternatives

- [jsforce](https://npm.io/package/jsforce.md) — 851.2K weekly downloads
- [react-native-qrcode-svg](https://npm.io/package/react-native-qrcode-svg.md) — 693.5K weekly downloads
- [@salesforce/plugin-data](https://npm.io/package/@salesforce/plugin-data.md) — 394.9K weekly downloads
- [@backstage/plugin-search-common](https://npm.io/package/@backstage/plugin-search-common.md) — 308.5K weekly downloads
- [@chain-registry/types](https://npm.io/package/@chain-registry/types.md) — 38.4K weekly downloads

## Recent versions

- 1.0.13 (latest) — 2016-11-07
- 1.0.12 — 2016-08-20
- 1.0.11 — 2016-08-20
- 1.0.10 — 2016-08-12
- 1.0.9 — 2016-08-11
- 1.0.8 — 2016-08-10
- 1.0.7 — 2016-08-01
- 1.0.6 — 2016-08-01
- 1.0.5 — 2016-08-01
- 1.0.4 — 2016-07-31
- 1.0.3 — 2016-07-31
- 1.0.2 — 2016-07-30
- 1.0.1 — 2016-07-30
- 1.0.0 — 2016-07-30

## README

<p align="center">
  <a href="http://courses.angularclass.com/courses/angular-2-fundamentals?utm_source=github-angular2-conventions-loader&utm_medium=open-source&utm_campaign=angular2conventionsloader" target="_blank">
    <img width="438" alt="Angular 2 Fundamentals" src="https://cloud.githubusercontent.com/assets/1016365/17200649/085798c6-543c-11e6-8ad0-2484f0641624.png">
  </a>
</p>

___

# Angular 2 Conventions Loader
Allow defaults for `@Component` metadata for Angular 2

`npm install @angularclass/conventions-loader --save-dev`
loader options
```es6
// default values
selectorPrefix = '';
cssExtension   = '.css';
htmlExtension  = '.html';
'-component' is removed from selector generated by className
```

```js
{
  test: /\.ts$/,
  loaders: [
    'ts-loader',
    '@angularclass/conventions-loader'
  ]
},
```

Given this simple Component example
`app.js`

```typescript
@Component({})
export class App {
}
```
Webpack will change the code
`app.js`

```typescript
@Component({
  selector: "app",
  styles: [require("./app.css")],
  template: require("./app.html")
})
export class App {
}
```
this is assuming you have corresponding files next to the component. You may overwrite the selector at anytime by providing one. If the selector and the component file name does not match then the corresponding css/template file with the selector will be injected.


## Credits
[Sean Larkin](https://github.com/TheLarkInn) from the Webpack team [TheLarkInn/angular2-template-loader](https://github.com/TheLarkInn/angular2-template-loader)

___

enjoy — **AngularClass**

<br><br>

[![AngularClass](https://cloud.githubusercontent.com/assets/1016365/9863770/cb0620fc-5af7-11e5-89df-d4b0b2cdfc43.png  "Angular Class")](https://angularclass.com)
##[AngularClass](https://angularclass.com)
> Learn AngularJS, Angular 2, and Modern Web Development from the best.
> Looking for corporate Angular training, want to host us, or Angular consulting? patrick@angularclass.com

___

Apache-2.0

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