<section class="container">
<form class="form" (ngSubmit)="transferir()">
<h1 class="title">Nova Transferência</h1>
<div class="form-field">
<label class="form-field__label" for="valor">Valor</label>
<input class="form-field__input" id="valor" type="text" [(ngmodel)]="value">
</div>
<div class="form-field">
<label class="form-field__label" for="valor">Destino</label>
<input class="form-field__input" id="valor" type="text" [(ngmodel)]="destiny">
</div>
<div class="btn">
<button class="button">Transferir</button>
</div>
</form>
</section>
Arquivo TS
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-nova-transferencia',
templateUrl: './nova-transferencia.component.html',
styleUrls: ['./nova-transferencia.component.css']
})
export class NovaTransferenciaComponent implements OnInit {
transferir() {
console.log('Solicitada nova transferência')
}
constructor() {
value: number;
destiny: number;
}
ngOnInit(): void {
}
}