Reputation: 281
I use angular 2 to develop front end and use Asp MVC (not ASP CORE) for back end...
in normal asp mvc application use this steps to publish app :
and other steps
when I use that steps and upload my website on host website just show default loading message used in
"<my-app>Loading...</my-app>"
this is my published folder used by default steps :
please help me ! and say me steps for publish my web application
tanks
Upvotes: 1
Views: 434
Reputation: 2284
Well, i have faced this problem not long time ago, unfortunately i didnt found alot of information about it but can share some experience.
wwwroot
in my case)"outDir": "PROJECT_PATH_OR_EMPTY_IF_ITS_IN_SAME_FOLDER/wwwroot"
)ng build --prod --output-hashing=none --environment=qa
)here the problems starts: In .net core you can just configure project to load index.html file from wwwroot folder and everything is fine, but i couldn`t do it in that case (any ideas apreciated)
So...
modify default route for mvc app to load only one view (angular itself will take care afterwards)
routes.MapRoute( name: "Default", url: "{*url}", defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional } );
modify layout page - copy all index.html content to _Layout.html (make sure that script tags refers to correct files in wwwroot folder)
publish as usual
solution example
I hope it will help.
Upvotes: 2