I have recently integrated a boostrap admin template (based on Angular2) in an asp project (here is the repo )
The thing is: when I am running tsc
, all files compile well, but if I change html
files, if the web browser (let say firefox) opened the project previously, the page never change, but if I open a new web browser (let say chrome) I can see the change. Now, if I change an html
again, neither one can detect new changes in html
files.
I think it is dotnet
configuration, because I used the bootstrap angular template which is set up with npm lite server, and it has not any problems (I mean: change .ts
files, .html
files and it refresh always well)
To reproduce the problem, these are the steps:
login.component.ts
: template: <h1> Hello!</h1>
login.component.ts
: template: <h1> Hello World!</h1>
The asp
app were caching the pages, so I changed the web.config
<system.webServer>
<httpProtocol>
<customHeaders>
<add name="Cache-Control" value="no-cache, no-store" />
<add name="Pragma" value="no-cache" />
<add name="Expires" value="-1" />
</customHeaders>
</httpProtocol>
<handlers>
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified"/>
</handlers>
<aspNetCore processPath="%LAUNCHER_PATH%" arguments="%LAUNCHER_ARGS%" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" forwardWindowsAuthToken="false"/>
</system.webServer>
</configuration>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.