Jul 16, 2024
node --version
).npm install -g @angular/cli
.ng new login-page
.login-page
cd login-page
code .
npm start
.app.component.html
e app.component.css
.<router-outlet></router-outlet>
no app.component.html
.<h1>Oi</h1>
.ng generate component
): ng g c components/default-login-layout
.<div class="main">
<div class="form-section">
<img src="" alt="Logo">
<h2>{{ title }}</h2>
<form>
<!-- Inputs do formulário -->
</form>
<div class="button-wrapper">
<button class="primary-button">{{ primaryButtonText }}</button>
<div class="divider">
<div></div>
<span>or</span>
<div></div>
</div>
<button class="secondary-button">{{ secondaryButtonText }}</button>
</div>
</div>
<div class="main-section">
<img src="assets/svg/main-illustration.svg" alt="Main Illustration">
</div>
</div>
ng g c pages/login
.ReactiveFormsModule
e configurar formulário reativo.login.component.ts
e login.component.html
.ng g c components/primary-input
.
<input [formControlName]="formName" [type]="type" [placeholder]="placeholder">
<label for="{{ formName }}">{{ label }}</label>
<ng-content></ng-content>
_variables.scss
), contendo cores e tamanhos usados na aplicação.display: flex
, flex-direction
, align-items
, e justify-content
.ng generate service services/login
).HttpClient
no serviço e no módulo principal.ng add ngx-toastr
.ng g c pages/signup
.