I have successfully setup my angular 2 application in asp.net core which is working great. My main.js file is inside the app folder.
Working fine beacause the default mvc templete is
app.UseMvc(routes =>
{
routes.MapRoute(
name: "default",
template: "{controller=Home}/{action=Index}/{id?}");
});
I am facing a new problem. I have use the achor tag as below. `
<li><a asp-controller="Account" asp-action="Login">Login </a></li>
Now the navigation URL is http://localhost:28739/Account/Login
In my systemjs.config.js I have mention the main as show below
packages: {
app: {
main: './main.js',
defaultExtension: 'js'
},
rxjs: {
defaultExtension: 'js'
},
'angular2-in-memory-web-api': {
main: './index.js',
defaultExtension: 'js'
}
}
Its works great when there is no controller name and action name in the url. But when their is controller name and action name. It gives me a error as main.js not found. Below is the image.
Can anyone please tell me how to solve this issue.


<base href='/'>in the<head>section?