-
Notifications
You must be signed in to change notification settings - Fork 0
Feature/auth #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Feature/auth #3
Conversation
src/iap/modules/auth/components/signup-form/signup-form.component.ts
Outdated
Show resolved
Hide resolved
src/iap/modules/auth/components/signup-form/signup-form.component.html
Outdated
Show resolved
Hide resolved
| @@ -1,11 +1,25 @@ | |||
| import { NgModule } from '@angular/core'; | |||
| import { NgModule, isDevMode } from '@angular/core'; | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| import { NgModule, isDevMode } from '@angular/core'; | |
| import { NgModule } from '@angular/core'; |
| type="submit" | ||
| class="iap-signup-form__submit-button" | ||
| value="Sign Up" | ||
| [disabled]="signupForm | isControlInvalid" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| [disabled]="signupForm | isControlInvalid" | |
| [disabled]="signupForm.invalid" |
| styleUrls: ['./signup-form.component.scss'], | ||
| }) | ||
| export class SignupFormComponent implements OnInit { | ||
| @Output() submitEvent: EventEmitter<ApiResponse> = new EventEmitter(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we have already discussed this topic, but when your variable can define its type automatically you haven't to add pure typing.
| @Output() submitEvent: EventEmitter<ApiResponse> = new EventEmitter(); | |
| @Output() submitEvent = new EventEmitterr<ApiResponse>(); |
| return this.api.post(url, { login, password }).pipe( | ||
| tap((res: any) => this.setSession(res as JwtSession)), | ||
| shareReplay(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use your new possibilities!
| return this.api.post(url, { login, password }).pipe( | |
| tap((res: any) => this.setSession(res as JwtSession)), | |
| shareReplay(), | |
| return this.api.post<JwtSession>(url, { login, password }).pipe( | |
| tap((res) => this.setSession(res)), | |
| shareReplay(), |
| const url = apiRoutesAuth.loginAdimn; | ||
| return this.api.post(url, { login, password }).pipe( | ||
| tap((res: any) => this.setSession(res as JwtSession)), | ||
| shareReplay(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remind me what is the reason to use shareReplay here?
No description provided.