Skip to content

1 start #20

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

Open
wants to merge 15 commits into
base: 1-start
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
loginForm
  • Loading branch information
giselalanciani committed Oct 28, 2024
commit e46a39befe0e41c88fce3ecdb6c24d6ae98d5736
2 changes: 1 addition & 1 deletion src/app/app.component.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

>>> body {
body {
margin: 0;
}

Expand Down
17 changes: 4 additions & 13 deletions src/app/login/login.component.html
Original file line number Diff line number Diff line change
@@ -1,27 +1,18 @@
<mat-card class="login-page">
<mat-card-title>Login</mat-card-title>
<mat-card-content>

<form class="login-form data-form">

<form class="login-form data-form" #loginForm="ngForm">
<mat-form-field>

<input matInput type="email" name="email"
placeholder="Email">

<input matInput type="email" name="email" placeholder="Email" />
</mat-form-field>

<mat-form-field>

<input matInput type="password" placeholder="Password">

<input matInput type="password" placeholder="Password" />
</mat-form-field>

<button mat-raised-button color="primary">
<button mat-raised-button color="primary" (click)="login(loginForm)">
Login
</button>

</form>

</mat-card-content>
</mat-card>
23 changes: 9 additions & 14 deletions src/app/login/login.component.ts
Original file line number Diff line number Diff line change
@@ -1,21 +1,16 @@
import { Component, OnInit } from '@angular/core';

import { Component, OnInit } from "@angular/core";
import { NgForm } from "@angular/forms";

@Component({
selector: 'login',
templateUrl: './login.component.html',
styleUrls: ['./login.component.css']
selector: "login",
templateUrl: "./login.component.html",
styleUrls: ["./login.component.css"],
})
export class LoginComponent implements OnInit {
constructor() {}


constructor() {


ngOnInit() {}
login(loginForm: NgForm) {
console.log(loginForm.value, loginForm.valid);
}

ngOnInit() {

}

}