0.1.3 • Published 7 years ago
endgegner-trace v0.1.3
endgegner-trace
Installation
To install this module, run:
$ npm install '../endgegner-trace/dist/endgegner-trace<current_version>.tgz'
Consuming the module
you can import endgegner-trace in any Angular application by running:
$ npm install endgegner-trace
and then from your Angular AppModule
:
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { AppComponent } from './app.component';
// Import the module
import { LoggerModule } from 'endgegner-trace';
@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule,
// Specify your library as an import
LoggerModule.forRoot()
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }
Once the module is imported, you can use its components, directives and pipes in your Angular application:
// *.component.ts
constructor(private logService: LogService) {
// specify a namespace for the logs
this.logService.namespace = 'LoginComponent';
// example of a log entry
this.logService.log( 'constructor LoginComponent');
}
Development
To generate all *.js
, *.d.ts
and *.metadata.json
files:
$ npm run build
To lint all *.ts
files:
$ npm run lint
License
MIT © Michael Winkler