To install this library, run:
$ npm install n9-angular2-session --save
and then from your Angular AppModule
:
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { AppComponent } from './app.component';
// Import your library
import { N9SessionModule } from 'n9-angular2-session';
export interface TestExtend extends SessionType {
deviceType: string
}
@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule,
// Specify the library as an import and implement your SessionType extend if you want to add new field to the default SessionType
N9SessionModule.forRoot<TestExtend>()
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }
To generate all *.js
, *.js.map
and *.d.ts
files:
$ npm run build
To lint all *.ts
files:
$ npm run lint
MIT © Gaetan SENN