Closed littlemaneuver closed 9 years ago
Aha,
So you set e.g. baseDir: "path\on\windows"
and then this line is run
fileName = opts.baseDir ? file.replace(path.join(appDir, opts.baseDir), '') : file.match(fileMatching)[1];
that joins the baseDir
and the appDir
. (path.join(appDir, opts.baseDir)
).
What's the output of that? Do you get some sort of output in the browser console or terminal?
The name in template cache is set with back slashes. So file.replace(path.join(appDir, opts.baseDir), '') .replace(/\\/g, '/')
works fine for me
Are you using backslashes for baseDir
?
nope, path module takes care of it. The problem is that it returns windows-like path instead of unix-like. so /src/app/some-directive.html
doesn't match \src\app\some-directive.html
Ahh I see, the template cache needs to have unix-like paths /src/app/some-directive.html
but instead it's given \src\app\some-directive.html
(due to the path.join operation) which won't work for angulars template cache?
So file.replace(path.join(appDir, opts.baseDir), '') .replace(/\\/g, '/')
fixes that I see. Would you like to do a PR for that?
heh, of course :)
Hi,
there is a problem with back slashes in template path on windows when baseDir is set. (That's caused by path.join method).
Porbably you have some ideas how to handle it, thank in advance