My Angular 2 service:
private checkEmailAvailabilityUrl = 'api/admin/checkemailavailability';
checkEmailAvailability(email: string): Observable<boolean> {
let params = new URLSearchParams();
params.set('email', email);
return this.http
.get(this.checkEmailAvailabilityUrl, { search: params })
.map((response: Response) => {
return this.extractData(response);
});
}
My controller action:
[Route("[action]")]
[HttpGet]
public async Task<IActionResult> CheckEmailAvailability(string email)
{
return Json(new Json("success", false));
}
I set a breakpoint in Visual Studio, but the application does not reach it. I also attempted to include [FromQuery]
for email
, but it did not resolve the issue. What steps should I take to address this?