0
I am developing an angular project that is breaking the link when it has parameter and is typed directly in the browser, only occurs when it is published in IIS, if I do the same in the published in development in "ng serves" this same error does not occur, looking at Chrome’s console the error it presents to me is "Uncaught Syntaxerror: Unexpected token <", I noticed that in Sources all uploaded files are loading index.html which is generating this error, if the parameter link is generated internally by the angle by clicking on a Button or Link it works correctly, but even this link pressing enter in the browser bar occurs this same problem. On IIS I am using the Rwriter URL to be able to use the routes through the web browser.config
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="Angular Routes" stopProcessing="true">
<match url=".*" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="./" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
"http://www.checkbooking.com.br/checkinexpress/register/a" does not process the file . ts, I have tried to put anguns logs, and also does not pass the Interceptor I created
this /checkingexpress is a route of use application? Or type the index is there?
– Eduardo Vargas
@Eduardovargas yes, the index is on this route, if you access this path it redirects to login
– Lucas Riechelmann Ramos
tries to build it like this: ng build --base-href=/checkinexpress/
– Eduardo Vargas
@Eduardovargas thank you worked, put your reply that I mark it as the solution
– Lucas Riechelmann Ramos
link to help others here
– Gaspar