ReactJS-AdminLTE icon indicating copy to clipboard operation
ReactJS-AdminLTE copied to clipboard

href path issue for files under views folder

Open lambone opened this issue 10 years ago • 3 comments

I find out that the path in the html files under views folder are broken, for example, ReactJS-AdminLTE/reactjs-adminlte/views/index2.html ,

but dist dir is under public folder. Either the path is not correct or these files under views folder need to be move to public.

lambone avatar Dec 09 '15 12:12 lambone

Did you open views/index2.html directly in chrome, or did you open it by running the web server?

The files in views folder are meant for getting served from a web server. So if you run -

node server.js

and go to http://localhost:8080/index2.html, you will see the page getting served with all paths pointing to the correct resources. The idea of putting them in views folder is to show that this is server-side rendering (node server is configured to look in the views folder for serving pages), which could be done on the client side in reactjs, like views/widgets.html. You can see that there is almost no markup in widgets.html.

Does this clarify your issue?

booleanhunter avatar Dec 09 '15 15:12 booleanhunter

yes, I exactly follow the instruction. go to http://localhost:8080/index2.html You can reproduce by click the "documentation", the link broken. image

lambone avatar Dec 14 '15 07:12 lambone

Ah yes, I see what you mean. The links don't work because the file paths differ while being served from the web-server.

Will fix it soon, thanks for pointing it out!

booleanhunter avatar Dec 14 '15 10:12 booleanhunter