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.
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.
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 %}
'http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js' results in <script type="text/javascript" src="/js/2bec354_jquery-ui.min_1.js"></script>