Click here to Skip to main content
15,886,781 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi team,

I want return message from API to Angular
how display message to Toaster

return Request.CreateErrorResponse(HttpStatusCode.NotFound, "Please validate values");


--------------------

how to return message in angular

What I have tried:

Hi team,

I want return message from API to Angular 
how display message to Toaster

<pre> return Request.CreateErrorResponse(HttpStatusCode.NotFound, "Please validate values");


--------------------

how to return message in angular
Posted
Updated 5-Jul-20 0:39am

1 solution

Try using the built-in HTTP helpers to do that; the get, post, etc.

You can check this tutorial on how to receive data from API from Angular website as well; http Angular[^]. When it comes to showing the data in a Toaster, see the Use on Toaster module on NPM: https://www.npmjs.com/package/ngx-toastr[^].
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900