I have a simple website built with angular which I want to deploy on nginx.
I have installed nginx on my pc and have modified the root and index of nginx.conf file as below,
server {
listen 80;
server_name localhost;
#charset koi8-r;
#access_log logs/host.access.log main;
location / {
root C:/Angular-Project/angular2-trial/src;
index index.html;
}
}
No when I access the localhost, I get the index page - html content, but it doesn't resolve any Angular part. And there are no errors in the console.
Index.html
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Angular2Trial</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>
Is there something else I need to do so that my angular app is functional?


