I am using assetic in a twig template to include a javascript file
from my bundle’s public folder.
The problem is this JS file has URLs in it to call other pages using
jQuery.
How should i handle these URLs? I could write the URLs as absolute
paths – but this causes problems between the dev and prod environment,
and also makes the application not very portable.
What is the best way to do such things?
Maybe moving those urls to a configuration file .
that config.js can be generated via twig and contain the proper urls generated from the routing table