This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="background"> | |
<div class="login-container"> | |
<div class="text-container"> | |
<h1>Hey Stranger</h1> | |
<p> | |
Want to create an awesome account to access this awesome app? Go ahead | |
and click the button below! | |
</p> | |
<button mat-button routerLink="/register">Sign up</button> | |
</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Component, OnInit } from '@angular/core'; | |
import { AuthService } from 'src/app/core/services/auth.service'; | |
import { LoginData } from 'src/app/core/interfaces/login-data.interface'; | |
import { Router } from '@angular/router'; | |
@Component({ | |
selector: 'app-register-page', | |
templateUrl: './register-page.component.html', | |
styleUrls: ['./register-page.component.css'], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="container"> | |
<h1>Welcome to NgBytes Register</h1> | |
<ngbytes-login-form (formData)="register($event)"></ngbytes-login-form> | |
</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { RouterModule, Routes } from '@angular/router'; | |
import { LoginPageComponent } from './pages/login-page/login-page.component'; | |
import { NgModule } from '@angular/core'; | |
import { RegisterPageComponent } from './pages/register-page/register-page.component'; | |
const routes: Routes = [ | |
{ path: '', component: LoginPageComponent }, | |
{ path: 'register', component: RegisterPageComponent }, | |
]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
h1 { | |
color: #838383; | |
margin-bottom: 50px; | |
} | |
.container { | |
align-items: center; | |
display: flex; | |
flex-direction: column; | |
justify-content: center; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="container"> | |
<h1>Welcome to NgBytes Register</h1> | |
</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { RouterModule, Routes } from '@angular/router'; | |
import { NgModule } from '@angular/core'; | |
const routes: Routes = [ | |
{ | |
path: '', | |
loadChildren: () => | |
import('./features/auth/auth.module').then((m) => m.AuthModule), | |
}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { | |
Auth, | |
createUserWithEmailAndPassword, | |
signInWithEmailAndPassword, | |
signOut, | |
} from '@angular/fire/auth'; | |
import { Injectable } from '@angular/core'; | |
import { LoginData } from '../interfaces/login-data.interface'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Auth, signInWithEmailAndPassword } from '@angular/fire/auth'; | |
import { Injectable } from '@angular/core'; | |
import { LoginData } from '../interfaces/login-data.interface'; | |
@Injectable({ | |
providedIn: 'root', | |
}) | |
export class AuthService { | |
constructor(private auth: Auth) {} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Component, OnInit } from '@angular/core'; | |
import { AuthService } from 'src/app/core/services/auth.service'; | |
import { LoginData } from 'src/app/core/interfaces/login-data.interface'; | |
import { Router } from '@angular/router'; | |
@Component({ | |
selector: 'app-login-page', | |
templateUrl: './login-page.component.html', | |
styleUrls: ['./login-page.component.css'], |