0.0.15 • Published 6 years ago
@softwhisper/component-auth v0.0.15
SoftWhisper Component
Auth
Technology
System Requirements
- NPM
- npm i -g typescript -D
- npm i -g typings -D
Dependencies
How to install
npm i -S @softwhisper/component-auth
- Add import to app.module.ts using your configuration object:
SwAuthModule.initializeApp(config)
How to use
You can use the following directives in your app:
- sw-auth-signin
- sw-auth-signout
- sw-auth-signup
You also have access to AuthService:
import { AuthService } from '@softwhisper/auth/services/auth';
export class YourClass {
constructor(public authService: AuthService) {}
}
Displaying elements when the user is authenticated:
<div *ngIf="authService.user | async">...</div>