-
Notifications
You must be signed in to change notification settings - Fork 4
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
JiT would not work with templateUrl #4
Comments
Hi please post your entire component.ts code for review. |
Also your app.routes.ts |
Here is my account.component.ts
Here is my app.routes.ts
In AoT works well, in JiT log not found "account.html". |
My file structure is
|
I changed your sample code "sub.component.ts" to load templateUrl instead of inline template.
I change the content to make sure that URL is correct
Is that bundle problem ? |
The problem is because it does not understand the relative path unless specially configured to do so. Check your tsconfig.json file, make sure you have Last resort you can put absolute path from project root to the component template file, that will work for sure. But it's better if you can locate which configuration is incorrect. (either tsconfig.json or webpack config). If you can't figure it still, post your entire config files for webpack and TypeScript and I will analyze them. |
You can check my repo files to compare and find what is different. Remember you need two tsconfig.json files, one for JIT and one for AOT. See my tsconfig.json JIT See my tsconfig.aot.json |
Hi,
Thanks for the amazing example code. I have worked for AoT and JiT for days to figure out the correct way.
My components link html by "templateUrl" and strangely AoT mode works as usual , however JiT mode goes wrong and log "cannot find main.html"
Could you tell me how to fix this issue?
Thanks a lot . :)
The text was updated successfully, but these errors were encountered: