refactor(core): move facades out of core
This is part of ongoing work to make core platform-independent. BREAKING CHANGE All private exports from 'angular2/src/core/facade/{lang,collection,exception_handler}' should be replaced with 'angular2/src/facade/{lang,collection,exception_handler}'.
This commit is contained in:
@ -5,6 +5,7 @@ import {
|
||||
Validators,
|
||||
NgFormModel,
|
||||
FormBuilder,
|
||||
ControlGroup,
|
||||
NgIf,
|
||||
NgFor,
|
||||
Component,
|
||||
@ -13,7 +14,7 @@ import {
|
||||
Host
|
||||
} from 'angular2/core';
|
||||
|
||||
import {RegExpWrapper, print, isPresent} from 'angular2/src/core/facade/lang';
|
||||
import {RegExpWrapper, print, isPresent} from 'angular2/src/facade/lang';
|
||||
|
||||
/**
|
||||
* Custom validator.
|
||||
@ -56,7 +57,7 @@ class ShowError {
|
||||
constructor(@Host() formDir: NgFormModel) { this.formDir = formDir; }
|
||||
|
||||
get errorMessage(): string {
|
||||
var control = this.formDir.form.find(this.controlPath);
|
||||
var control = (<ControlGroup>this.formDir.form).find(this.controlPath);
|
||||
if (isPresent(control) && control.touched) {
|
||||
for (var i = 0; i < this.errorTypes.length; ++i) {
|
||||
if (control.hasError(this.errorTypes[i])) {
|
||||
|
Reference in New Issue
Block a user