Ionic 2: import Control shows error


#1

i’m trying to import Control for email Validator and it shows my error in my project ionic 2 RC0, this is my code
/**

import { Control } from ‘@angular/common’;
export class EmailValidator {

static isValid(control:  Control) {
    var re = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(control.value);
    if (re) {
        return null;
    }
    return {"invalidEmail": true};
}

}

it shows error when i’m import Control


#2

Hey! Same issue here.

RC.1 Changes a little bit.

Take a look at this: https://github.com/javebratt/event-tutorial/blob/master/src/validators/email.ts