aggiornamento
Nel nuovo modulo forme questo è stato migliorato molto.
AbstractControl
, la classe base della maggior parte delle classi di form fornisce
markAsTouched({onlySelf}?: {onlySelf?: boolean}) : void
markAsUntouched({onlySelf}?: {onlySelf?: boolean}) : void
markAsDirty({onlySelf}?: {onlySelf?: boolean}) : void
markAsPristine({onlySelf}?: {onlySelf?: boolean}) : void
markAsPending({onlySelf}?: {onlySelf?: boolean}) : void
e diversi altri nuovi metodi
disable({onlySelf, emitEvent}?: {onlySelf?: boolean, emitEvent?: boolean}) : void
enable({onlySelf, emitEvent}?: {onlySelf?: boolean, emitEvent?: boolean}) : void
setValue(value: any, options?: Object) : void
patchValue(value: any, options?: Object) : void
reset(value?: any, options?: Object) : void
updateValueAndValidity({onlySelf, emitEvent}?: {onlySelf?: boolean, emitEvent?: boolean}) : void // (old)
setErrors(errors: {[key: string]: any}, {emitEvent}?: {emitEvent?: boolean}) : void
originale
Al momento non è supportato. Vedi https://github.com/angular/angular/issues/5568 e https://github.com/angular/angular/issues/4933. La soluzione usuale è ricreare il modulo per ottenere uno originale.
fonte
2016-05-13 11:53:06
........... super ........... – Birowsky