Answer the question
In order to leave comments, you need to log in
How to host Angular 2 on ASP?
The project is based on pure ASP MVC and pure Angular 2 (cli). Clean - that is, there are no my files. Only settings. If I run it through ng serve , then everything is ok, Angular works. If I host ASP, then I get a page with Loading... The necessary files are not loaded.
Actually it is understandable, links are clearly not indicated
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Wwwroot</title>
<base href="/">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/x-icon" href="favicon.ico">
</head>
<body>
<app-root>Loading...</app-root>
</body>
</html>
Answer the question
In order to leave comments, you need to log in
By default, the files to run are in the dist folder. Its content must be hosted. If the folder is empty, then you need to run ng build. ng build -prod - for release project
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question