mirror of
https://github.com/aspnet/JavaScriptServices.git
synced 2025-12-24 02:30:13 +00:00
Fixes
This commit is contained in:
@@ -89,8 +89,8 @@ export class AlbumEdit {
|
||||
});
|
||||
}
|
||||
|
||||
public get formErrors() {
|
||||
return Object.keys(this.form.errors || {});
|
||||
public get formErrors(): string[] {
|
||||
return this.form.dirty ? Object.keys(this.form.errors || {}) : [];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ export class FormField {
|
||||
private validate: ng.AbstractControl;
|
||||
|
||||
public get errorMessages() {
|
||||
var errors = (this.validate && this.validate.touched && this.validate.errors) || {};
|
||||
var errors = (this.validate && this.validate.dirty && this.validate.errors) || {};
|
||||
return Object.keys(errors).map(key => {
|
||||
return 'Error: ' + key;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user