generic-client
v1.0.0
Published
`npm install @promots/generic-client`
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/dist/out-tsc/services/authentication.service'; - 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/src/app/components/header/header.module';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
