I solved it without the asset-manager,
just including the script statically.
Using javascript in Symfony2/Twig with external references
-
30-09-2022 - |
Pregunta
In reference to the following post:
Using javascript in Symfony2/Twig
Is there a possibility to include scripts locating on other servers, just as google-api.
Solución 2
Otros consejos
The fact that the script is located on an external server doesn't change much. You can still have Assetic handle it like in the example below.
{% block javascripts %}
{% javascripts
'http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js'
'@AcmeDemoBundle/Resources/public/js/demo.js'
%}
<script src="{{ asset_url }}"></script>
{% endjavascripts %}
{% endblock %}
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow