fix(ivy): correct absolute path processing for templateUrl and styleUrls (#28789)
Prior to this change absolute file paths (like `/a/b/c/style.css`) were calculated taking current component file location into account. As a result, absolute file paths were calculated using current file as a root. This change updates this logic to ignore current file path in case of absolute paths. PR Close #28789
This commit is contained in:

committed by
Igor Minar

parent
72d043f669
commit
df627e65df
@ -115,6 +115,9 @@ export class HostResourceLoader implements ResourceLoader {
|
||||
// Strip a leading '/' if one is present.
|
||||
if (url.startsWith('/')) {
|
||||
url = url.substr(1);
|
||||
|
||||
// Do not take current file location into account if we process absolute path.
|
||||
fromFile = '';
|
||||
}
|
||||
// Turn absolute paths into relative paths.
|
||||
if (!url.startsWith('.')) {
|
||||
|
Reference in New Issue
Block a user