I have an Angular MVC app that has couple of controllers. Default and another custom controller that I added.
http://example.com/home/
http://example.com/ManageSummaryInfo/
All my business logic lies with ManageSummaryInfo
Controller.
routes.MapRoute(
name: "Default",
url: "{controller}/{action}/{id}",
defaults: new { controller = "ManageSummaryInfo", action = "HomePage", id = UrlParameter.Optional }
);
In Angular Routing, I have it like this,
$routeProvider.when('/showsummary',
{
templateUrl: 'ManageSummaryInfo/ShowSummary',
controller: 'ShowSummaryController'
});
$routeProvider.when('/showerror',
{
templateUrl: 'ManageSummaryInfo/ShowError',
controller: 'ShowErrorController'
});
$routeProvider.when('/showplatform',
{
templateUrl: 'ManageSummaryInfo/ShowPlatform',
controller: 'ShowPlatformController'
});
My Views are also configured around ManageSummaryInfo
Controller, but when I run I get to the home page, after which I click on one of elements should take me to the next page. But, I dont get routed and I got 404 - The resource cannot be found.
error.
This is how my views look,
Views
--ManageSummaryInfo
----HomePage.cshtml
----Index.cshtml
----ShowSummary.cshtml
----ShowError.cshtml
----ShowPlatform.cshtml
My question, is when we have controllers in our route (ie, http://example.com/ManageSummaryInfo/- how would Angular route things and why mine getting file not found error.
I'm new to C# MVC Framework. Am I missing something related to ASP.NEt Routing ?Any help would be appreciated. I have tried to be eloborate, but if you would need more info, I'm happy to provide more code(Pastebin or something.
Thanks in advance!
Edit:
Adding Controller Class as per request,
public class ManageSummaryInfoController : Controller
{
// GET: ManageSummaryInfo
public ActionResult Index()
{
return View();
}
public ActionResult HomePage()
{
return View();
}
public ActionResult ShowPlatform()
{
return PartialView("ShowPlatform");
}
public ActionResult ShowSummary()
{
return PartialView("ShowSummary");
}
public ActionResult ShowError()
{
return PartialView("ShowError");
}
}