Answer the question
In order to leave comments, you need to log in
Symfony 3 how to call bundle components jquery in template?
Installed via composer jquery ( composer require components/jquery )
What is the correct way to call it in the template, in particular for the dev version?
Twig templating engine (of course)
Also worth AsseticManager
Answer the question
In order to leave comments, you need to log in
As always, there are a lot of options.
{% extends 'base.html.twig' %}
{% block body %}
<script>
{{ source('/absolute/path/') }}
</script>
{% endblock %}
assetic:
assets:
js:
inputs:
- '/path/to/libray'
output: 'output/path'
class Controller
{
public function proxyAssetFile($path)
{
$realpath = $this->blackMagic($path);
return new \Symfony\Component\HttpFoundation\BinaryFileResponse($realpath);
}
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question