@angularclass/match-control
Advanced tools
Comparing version 1.0.1 to 2.0.0
@@ -1,2 +0,2 @@ | ||
import { NgForm, AbstractControl, Validator } from '@angular/common'; | ||
import { NgForm, Validator } from '@angular/forms'; | ||
export declare class AcMatchControlValidator implements Validator { | ||
@@ -6,3 +6,3 @@ formDir: NgForm; | ||
constructor(formDir: NgForm, matchControl: string); | ||
validate(c: AbstractControl): { | ||
validate(c: any): { | ||
[key: string]: any; | ||
@@ -9,0 +9,0 @@ }; |
@@ -15,3 +15,3 @@ "use strict"; | ||
var core_1 = require('@angular/core'); | ||
var common_1 = require('@angular/common'); | ||
var forms_1 = require('@angular/forms'); | ||
var AcMatchControlValidator = (function () { | ||
@@ -37,3 +37,3 @@ function AcMatchControlValidator(formDir, matchControl) { | ||
{ | ||
provide: common_1.NG_VALIDATORS, | ||
provide: forms_1.NG_VALIDATORS, | ||
useExisting: core_1.forwardRef(function () { return AcMatchControlValidator; }), | ||
@@ -45,3 +45,3 @@ multi: true | ||
__param(1, core_1.Attribute('ac-match-control')), | ||
__metadata('design:paramtypes', [common_1.NgForm, String]) | ||
__metadata('design:paramtypes', [forms_1.NgForm, String]) | ||
], AcMatchControlValidator); | ||
@@ -48,0 +48,0 @@ return AcMatchControlValidator; |
{ | ||
"name": "@angularclass/match-control", | ||
"version": "1.0.1", | ||
"version": "2.0.0", | ||
"author": "Partick Stapleton <patrick@angularclass.com>", | ||
@@ -23,11 +23,12 @@ "description": "Angular 2 Match Control", | ||
"devDependencies": { | ||
"@angular/http": "2.0.0-rc.1", | ||
"@angular/common": "2.0.0-rc.1", | ||
"@angular/compiler": "2.0.0-rc.1", | ||
"@angular/core": "2.0.0-rc.1", | ||
"@angular/platform-browser": "2.0.0-rc.1", | ||
"@angular/platform-browser-dynamic": "2.0.0-rc.1", | ||
"@angular/platform-server": "2.0.0-rc.1", | ||
"@angular/router": "2.0.0-rc.1", | ||
"@angular/router-deprecated": "2.0.0-rc.1", | ||
"@angular/http": "2.0.0-rc.2", | ||
"@angular/common": "2.0.0-rc.2", | ||
"@angular/compiler": "2.0.0-rc.2", | ||
"@angular/core": "2.0.0-rc.2", | ||
"@angular/forms": "0.1.0", | ||
"@angular/platform-browser": "2.0.0-rc.2", | ||
"@angular/platform-browser-dynamic": "2.0.0-rc.2", | ||
"@angular/platform-server": "2.0.0-rc.2", | ||
"@angular/router": "2.0.0-rc.2", | ||
"@angular/router-deprecated": "2.0.0-rc.2", | ||
@@ -34,0 +35,0 @@ "core-js": "^2.4.0", |
import { Directive, Host, Attribute, forwardRef } from '@angular/core'; | ||
import { NgForm, ControlGroup, AbstractControl, NG_VALIDATORS, Validator } from '@angular/common'; | ||
import { NgForm, NG_VALIDATORS, Validator } from '@angular/forms'; | ||
@@ -18,4 +18,4 @@ @Directive({ | ||
} | ||
validate(c: AbstractControl): {[key: string]: any} { | ||
var form: ControlGroup = this.formDir.form; | ||
validate(c: any): {[key: string]: any} { | ||
var form = this.formDir.form; | ||
var control = form.find(this.matchControl); | ||
@@ -22,0 +22,0 @@ if (control !== undefined && control !== null && control.touched) { |
Sorry, the diff of this file is not supported yet
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
17593
21
1