I have declared following routes in the app-root.txs file of my stenciljs app:
<main id="main">
<div class="ba-content-header">
<stencil-router>
<stencil-route url="/" component="post-home"/>
<stencil-route url="/editor" component="page-home"/>
</stencil-router>
</div>
The approot component is used in the index.html file:
<body>
<app-root></app-root>
</body>
Now, the default route functions correctly and on that component I have a form element having a button :
<form action="/editor">
<button
id="send-message"
class="ba-btn ba-btn-primary"
type="submit">
<span>Send Message</span>
</button>
</form>
I am using the /editor route as form action and when the user clicks the Send Message button , I want him to be navigated to the component represented by this route. This works locally on the webpack dev server with npm start but I get a 503 error on nginx Web Server. I have tried with making the following entry in the nginx.conf file:
location / {
try_files $uri /index.html;
}
but to no avail and the problem persists. Whats the solution to this problem?