CodeIgniter Forums
Polymer - Google - Printable Version

+- CodeIgniter Forums (
+-- Forum: Using CodeIgniter (
+--- Forum: General Help (
+--- Thread: Polymer - Google (/showthread.php?tid=64131)

Polymer - Google - Mbanolas - 01-18-2016

I would like to use Polymer web component in the views of CI. It works fine when I load the view throgth a controller, but when I try to load the view with controller/method or controller/method/parameter dies nit work because do not get the correct url declared un the import links?
Please could you suggest what should be the structure of the directories? Thanks.

RE: Polymer - Google - PaulD - 01-22-2016

Hi, I don't know anything about Polymer but the problem you describe is of hard coded relative links that are wrong. Surely Polymer gives you a way to do relative links so you can use /assets/js/myjsfile.js which at least is relative to the root and can be made to work. Links that start without the / are relative to the page the link is on. That is a problem.

Also, surely Polymer can do full links, so you control the entire link etc. That would also solve the problem.

The other possible answer is to use polymer generated html that does not include js, css links and add them after from the controller in normally generated views.

There are so many things that could be causing the issue but there are also many possible solutions. The aim is to get away from relative links that depend on the url of the page the link is on.

Hope that helps, and makes sense,