You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm a bit confused by this loader, I'll try to set up a very straightforward config where all my HTML files are located into a templates folder (see the folder structure below). Thus if I have correctly understood the way this module works, I defined the following config:
When I try to require my templates/root.html from my angular entry point app/main.js with the following command:
const rootTpl = require('root.html');
I get the following error:
ERROR in ./app/main.js
Module not found: Error: Can't resolve 'root.html' in '[__dirname]/app'
I don't understand why it tries to resolve the path of my root.html from /app instead of /templates.
Any idea about what is wrong with my configuration? Maybe I'm missing something obvious.
I'm using angular 1.5.11, webpack 3.10.0 and ngtemplate-loader 2.0.1.
The text was updated successfully, but these errors were encountered:
Hi,
I'm a bit confused by this loader, I'll try to set up a very straightforward config where all my HTML files are located into a templates folder (see the folder structure below). Thus if I have correctly understood the way this module works, I defined the following config:
webpack.config.js
Folder structure
When I try to require my
templates/root.html
from my angular entry pointapp/main.js
with the following command:I get the following error:
I don't understand why it tries to resolve the path of my
root.html
from/app
instead of/templates
.Any idea about what is wrong with my configuration? Maybe I'm missing something obvious.
I'm using angular 1.5.11, webpack 3.10.0 and ngtemplate-loader 2.0.1.
The text was updated successfully, but these errors were encountered: