antonybudianto / angular-starter

:star: Gulp Angular Starter using TypeScript (Updated to 4.4.3)

Home Page:https://antonybudianto.github.io/angular-starter/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

No file change on the screen, despite recompile (RaydonZhu comment)

Michael-xxxx opened this issue · comments

Hi
I face the same issue:
RaydonZhu commented on 23 Nov 2016 • edited

I am trying to use this. everything works fine. However, it won't be able to 'recompile' automatically if file changes. For example, I change the text in a html file, and it seems that the app catched the changes and recompiled. However, i didn't see any changes on the screen. I had to rebuild it again, and then i could see the changes on the screen.
Why?
Thanks!

Thanks a lot in advance

Please give a repro, I cannot repro using latest master

Hi Antony,
I investigated the issue. If I change index.html (e.g. the title) everything is fine the change goes to the browser. But if I change navbar.html e.g.

 <li><a [routerLink]="['/']">HomeXX</a></li>

the change is not visible at the browser.
On the commandline I see
[BS] File changed: src\app\shared\navbar\navbar.html
the browser shows the sync message
but in the tmp folder the file navbar.html is unchanged

Sorry but cannot reproduce, it works on my machine, are you sure you're editing the right file? (Perhaps you're editing one from tmp or build folder)

No I don't change the file in tmp or build folder
[BS] File changed: src\app\shared\navbar\navbar.html
but if you can't reproduce it the issue should be closed

Hmm, what OS do you use? maybe OS specific

Yes, you are right. It is a platfrom problem. I'm using Windows 10 and
component.js
function convertToTmpPath(file) {
return file.path.replace(/src/app//, config.tmpApp);
}
goes only for linux
I hope this will work with linux and windwos:
function convertToTmpPath(file) {
var re = new RegExp('src\' + path.sep + 'app\' + path.sep,"g");
return file.path.replace(re, config.tmpApp);
}

@Michael-xxxx , can you create the PR? Thank you!