// vim: set tw=80 ts=2 sw=2 sts=2 : import { Component, ViewChild, AfterViewChecked, Input, Output, EventEmitter } from '@angular/core'; import { NgForm } from '@angular/forms'; import { Logger } from '@nsalaun/ng-logger'; import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; import { Account } from './account'; @Component({ selector: 'account-form', template: `

The account name is required.

-
.00€

The authorized overdraft is required.

The authorized overdraft must be equal or greater than 0.

` }) export class AccountFormComponent implements AfterViewChecked { @Input() account: Account; @Output() onFormChanged: EventEmitter = new EventEmitter(); @ViewChild('form') form: NgForm; constructor() {} ngAfterViewChecked() { this.onFormChanged.emit(this.form); } }