2.0.2 • Published 9 years ago
loggerservice v2.0.2
Description
Angular2 - Ionic2 custom Loggin.
Install
npm install loggerservice
Usage
template driven
import LoggingService
and Config
in app.module.ts as providers:
import { LoggingService, Config } from 'loggerservice';
import { AppComponent } from './app.component';
bootstrap: [IonicApp],
entryComponents: [
MyApp,
HomePage,
ListPage,
AboutPage,
DetailPage,
BindingPage,
FormValidation,
ControlMessagesComponent
],
providers: [Config,LoggingService, { provide: ErrorHandler, useClass: IonicErrorHandler }]
})
export class AppModule { }
import 'LoggingService' service in your myComponent.ts page; than you can use it in your code as the example below:
ionViewDidLoad() {
this.logger.log(this,'We\'re in the template-father-page');
}
License
MIT