-
Notifications
You must be signed in to change notification settings - Fork 664
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
index.html changes get reloaded one save behind #660
Comments
+1 seeing this behaviour too |
+1 I think it's because the Inject Task doesn't trigger a browser sync reload, because the styles task does indeed trigger one. |
Thanks for reporting, I reproduce it. I have to dig a bit... |
I just tried adding I also tried adding I also tried adding |
Reproduce. But why edit index.html @slawojstanislawski ? |
@zckrs this is a ridiculous question. lot's of reasons for doing this. |
Well, why edit, perhaps it is valid to say that one should only edit the templates/files angular puts together into the index.html at runtime, but one can still edit index.html and it causes reload, yet in a way that other files don't, I suppose it won't lead to anything serious, just a bit of confusion and introduction of one more unnecessary change (like a single blank space) to reload to see the change, it's just a user experience matter. |
Other cases would be to use webfonts via a CDN, or adding css classes to the toplevel content div. |
@jesucarr, @skeenan: I think the issue has something to do with that part:
I replaced it with:
and now works as expected :) Good luck. |
@sqal I just tried your suggestion but it doesn't seem to work for me :( |
@jesucarr ops ofc I made a mistake in my previous comment, it should be |
@sqal yes I did those changes and I also tried with a |
@jesucarr I understand the issue and I also had this problem, but my changes solved it for me (changes made to index.html are visible after first save). It's weird it's not working for you. But to make sure i just did clean install of generator, did the changes, ans it's still working :). |
The issue looks quite easy. The problem is just in the order of execution of tasks: as soon as you save changes to P.S. Though the issue is quite easy - it's quite hard to resolve it using Gulp 3.x |
Perfect, thanks for the analysis and the PR! |
@Swiip, Thank you for your generator, Matthieu. It's a pleasure to help a bit into it's development) |
Fix for bug #660 (index.html file is incorrectly reloaded)
When I introduce changes into .html files placed somewhere under /app folder, right after the save operation the changes are reflected in the browser, live reload works fine. But when I introduce changes to the src/index.html file, the change is reflected in the browser only after saving another (second) change. So live reload is one step behind on changes in the src/index.html file.
I thought changing line 36 in gulp/watch.js from:
to:
would help, but it didn't change the behavior.
The text was updated successfully, but these errors were encountered: