1

I am working on Aspnet Core Angular project and getting following error:

TS2304: Cannot find name 'email'.

The code is executed in visual studio 2017.

postEmailValidate(email?: string): Observable<any> {
    var data: {
        "Email": email,
        "Timeout": "5",
        "Verbose": "True"
    };        
    return this.http.post(
        this.urlEmailValidate,
        data,
        { headers: this.getHeaders("POST") }
        )
        //.delay(5000)
        .map(this.handleSuccess)
        .catch(this.handleError)
}

The code is very basic and I have declared a variable in the function's call. But the compiler gives the following error. Am I forgetting something or is it a visual studio issue.

enter image description here

enter image description here

closed as off-topic by Gautam Sheth, Aakash Maurya, P S, moe, Gaurravs Oct 17 '17 at 5:06

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Programming questions not specific to SharePoint are off-topic here, but can be asked on Stack Overflow." – Gautam Sheth, Aakash Maurya, P S, moe, Gaurravs
If this question can be reworded to fit the rules in the help center, please edit the question.

Browse other questions tagged or ask your own question.