diff --git a/modules/angular2/src/core/forms/directives/abstract_control_directive.ts b/modules/angular2/src/core/forms/directives/abstract_control_directive.ts index 235816ebac..05fe23bc0b 100644 --- a/modules/angular2/src/core/forms/directives/abstract_control_directive.ts +++ b/modules/angular2/src/core/forms/directives/abstract_control_directive.ts @@ -1,8 +1,9 @@ import {AbstractControl} from '../model'; import {isPresent} from 'angular2/src/core/facade/lang'; +import {unimplemented} from 'angular2/src/core/facade/exceptions'; -export class AbstractControlDirective { - get control(): AbstractControl { return null; } +export abstract class AbstractControlDirective { + get control(): AbstractControl { return unimplemented(); } get value(): any { return isPresent(this.control) ? this.control.value : null; } diff --git a/modules/angular2/src/core/forms/directives/ng_control.ts b/modules/angular2/src/core/forms/directives/ng_control.ts index a2574aabca..cc175b7bd8 100644 --- a/modules/angular2/src/core/forms/directives/ng_control.ts +++ b/modules/angular2/src/core/forms/directives/ng_control.ts @@ -10,11 +10,11 @@ import {unimplemented} from 'angular2/src/core/facade/exceptions'; // an abstract method in the public API, and we cannot reflect // on that in Dart due to https://github.com/dart-lang/sdk/issues/18721 // Also we don't have abstract setters, see https://github.com/Microsoft/TypeScript/issues/4669 -export class NgControl extends AbstractControlDirective { +export abstract class NgControl extends AbstractControlDirective { name: string = null; valueAccessor: ControlValueAccessor = null; get validator(): Function { return unimplemented(); } - viewToModelUpdate(newValue: any): void { return unimplemented(); } + abstract viewToModelUpdate(newValue: any): void; }