32 lines
875 B
TypeScript
32 lines
875 B
TypeScript
import { Component, OnInit, OnDestroy, Input } from '@angular/core';
|
|
import { UserState, UserService } from '../services/user.service';
|
|
import { BehaviorSubject, Subscription } from 'rxjs';
|
|
import { Router } from '@angular/router';
|
|
import { FormErrorCode, FormErrorEncoder } from '../utils/formcodes';
|
|
import { ResourceService } from '../services/resource.service';
|
|
|
|
/**
|
|
* A validated field that enables a user to enter the
|
|
* email. The email will be available through the
|
|
* components name which also acts as an input.
|
|
*/
|
|
@Component({
|
|
selector: 'app-email-field',
|
|
templateUrl: './email-field.component.html'
|
|
})
|
|
export class EmailFieldComponent extends FormErrorEncoder {
|
|
|
|
/**
|
|
* The email address.
|
|
*/
|
|
@Input() email: string;
|
|
/**
|
|
* Disables the field.
|
|
*/
|
|
@Input() disabled: boolean;
|
|
|
|
constructor(public res: ResourceService) {
|
|
super();
|
|
}
|
|
}
|