From 9d7b8a030979db6b5f4a350f17bdf3e822d66707 Mon Sep 17 00:00:00 2001 From: Clay Brinlee Date: Wed, 21 Sep 2016 09:43:50 -0500 Subject: [PATCH] Updated to support Angular 2.0.0 final --- src/index.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/index.ts b/src/index.ts index 558d8ff..7fc12fc 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,5 +1,5 @@ import { Component, Host } from '@angular/core'; -import { NgForm, ControlGroup } from '@angular/common'; +import { NgForm, FormGroup } from '@angular/forms'; @Component({ selector: 'ac-form-errors', @@ -23,8 +23,8 @@ export class AcFormErrors { } get errorMessages(): Array<{type: string, message: string}> { - var form: ControlGroup = this.formDir.form; - var control = form.find(this.controlPath); + var form: FormGroup = this.formDir.form; + var control = form.get(this.controlPath); var _errors = []; if (control !== undefined && control !== null && control.touched) { let errors = Object.keys(this.errorTypes);