Skip to content

Commit 13c5478

Browse files
committed
fix(package): added onLoginRequested event in ngx-auth-firebaseui-register #323
1 parent 647e195 commit 13c5478

File tree

3 files changed

+18
-5
lines changed

3 files changed

+18
-5
lines changed

src/module/components/ngx-auth-firebaseui-register/ngx-auth-firebaseui-register.component.html

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,19 @@
5555
</mat-error>
5656
</mat-form-field>
5757

58-
<div *ngIf="this.tosUrl || this.privacyPolicyUrl"
59-
class="terms"
60-
fxLayout="row" fxLayoutAlign="center center">
58+
<!-- <div *ngIf="this.tosUrl || this.privacyPolicyUrl"-->
59+
<div
60+
class="terms"
61+
fxLayout="row" fxLayoutAlign="center center"
62+
[@animate]="{value:'*',params:{duration:'250ms',y:'100px'}}">
6163
<mat-checkbox aria-label="I read and accept" name="terms" required>
6264
<span>{{readAncAcceptText}}</span>
65+
<span>&nbsp;</span>
66+
<a target="_blank"
67+
[href]="this.tosUrl">
68+
Terms of Service and Conditions
69+
</a>
6370
</mat-checkbox>
64-
<button mat-button [color]="color">{{termsAndConditionsText}}</button>
6571
</div>
6672

6773
<button
@@ -80,7 +86,9 @@
8086
{{alreadyHaveAccountText}}
8187
</span>
8288
<button mat-button
89+
type="button"
8390
[color]="colorAccent"
91+
(click)="onLoginRequested.emit()"
8492
[@animate]="{ value: '*', params: { x: '-100px' } }">
8593
{{loginButtonText}}
8694
</button>

src/module/components/ngx-auth-firebaseui-register/ngx-auth-firebaseui-register.component.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,4 +135,8 @@ ngx-auth-firebaseui-register {
135135
}
136136
}
137137
}
138+
::ng-deep .mat-checkbox-label {
139+
display: flex;
140+
flex-wrap: wrap;
141+
}
138142
}

src/module/components/ngx-auth-firebaseui-register/ngx-auth-firebaseui-register.component.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {Component, Inject, Input, OnDestroy, OnInit, Output, PLATFORM_ID, ViewEncapsulation} from '@angular/core';
1+
import {Component, EventEmitter, Inject, Input, OnDestroy, OnInit, Output, PLATFORM_ID, ViewEncapsulation} from '@angular/core';
22
import {AbstractControl, FormBuilder, FormGroup, ValidationErrors, ValidatorFn, Validators} from '@angular/forms';
33
import {MatFormFieldAppearance, ThemePalette} from '@angular/material';
44
import {Subject, Subscription} from 'rxjs';
@@ -72,6 +72,7 @@ export class NgxAuthFirebaseuiRegisterComponent implements OnInit, OnDestroy {
7272
// Events
7373
@Output() onSuccess: any;
7474
@Output() onError: any;
75+
@Output() onLoginRequested: EventEmitter<void> = new EventEmitter<void>();
7576

7677
registerForm: FormGroup;
7778
onErrorSubscription: Subscription;

0 commit comments

Comments
 (0)