Answered by:
Routing by action in Single page appliction

Question
-
User598234210 posted
I need add action name in my SPA web API route
like this ------- routeTemplate: "api/{controller}/{action}/{id}",
when can I edit the to SPA web API routes map like for web API "mapHttpRpoute" method web APi
routes.MapHttpRoute( name: "ActionApi", routeTemplate: "api/{controller}/{action}/{id}", defaults: new { id = RouteParameter.Optional } );
Thursday, December 11, 2014 9:38 AM
Answers
-
User-1926401737 posted
Hi SamuelMebrhatu,
This article looks at the details of the routing process, you could refer to it.
Hope it will be helpful to you.
Best Regards,
Sw-ing
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Monday, December 15, 2014 3:06 AM -
User-2007877324 posted
I need add action name in my SPA web API route
WebAPI does not support action. You cannot specify action name in the routing.
If you want routing by action, then use attribute routing. Please take a look at this
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Monday, December 15, 2014 8:48 AM
All replies
-
User-1926401737 posted
Hi SamuelMebrhatu,
This article looks at the details of the routing process, you could refer to it.
Hope it will be helpful to you.
Best Regards,
Sw-ing
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Monday, December 15, 2014 3:06 AM -
User-2007877324 posted
I need add action name in my SPA web API route
WebAPI does not support action. You cannot specify action name in the routing.
If you want routing by action, then use attribute routing. Please take a look at this
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Monday, December 15, 2014 8:48 AM