🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

@angularclass/conventions-loader

Package Overview
Dependencies
Maintainers
4
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@angularclass/conventions-loader

Allow default for @Component metadata for Angular 2

1.0.2
Source
npm
Version published
Weekly downloads
1.4K
-13.99%
Maintainers
4
Weekly downloads
 
Created
Source

Angular 2 Fundamentals

Angular 2 Conventions Loader

Allow default for @Component metadata for Angular 2

npm install @angularclass/conventions-loader --save-dev

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

Given this simple Component example app.js

@Component({})
export class App {
}

Webpack will change the code app.js

@Component({
  selector: "app",
  styles: [require("./app.css")],
  template: require("./app.html")
})
export class App {
}

this is assuming you have coresponding 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 coresponding css/template file with the selector will be injected.

enjoy — AngularClass



AngularClass ##AngularClass

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

Keywords

angular2

FAQs

Package last updated on 30 Jul 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts