@promots/generic-client
v1.4.9
Published
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 1.0.4.
Downloads
220
Readme
Installation
npm install @promots/generic-client
Using Authentication service
- Import the AuthenticationService into the component you want to use it:
import { AuthenticationService } from '@promots/generic-client'; - Declare on the variable in the constructor:
constructor(private auth: AuthenticationService) { this.auth = auth} - Now, you can use the method getUrlParams() to get the uid and token of the user
let urlParams = this.auth.getUrlParams();Note: the getUrlParams() method return object that contains the uid and the token
Using the Header component
- In your app.module.ts:
add
import { HeaderModule } from '@promots/generic-client';and then add HeaderModule to the imports list:@NgModule({ declarations: [ AppComponent ... ], imports: [ ... HeaderModule ], providers: [], bootstrap: [AppComponent], }) - Add
<generic-header [title]="title"></generic-header>to app.component.html file
Deployment
- Install globally the following packs:
npm install -g angular2-inline-template-style —save**if missingnpm install -g glob --save**if missingnpm install -g chokidar --save
run npm publish
