I think your need is covered by this bundle:
https://github.com/AppVentus/AsseticInjectorBundle
In each bundles you create, you can add a "Resources/config/assetic_injector.json" file, that define which asset to inject, and under which tag:
//ArticleBundle/Resources/config/assetic_injector.json
{
"require_all":
{
"javascripts":
{
"angular":
[
"@ArticlesBundle/Resources/public/js/controllers.js",
"@ArticlesBundle/Resources/public/js/directives.js"
]
},
"stylesheets":
{
"angular": "@ArticlesBundle/Resources/public/css/main.css"
}
}
}
You just have to add the filter "injector" on your "{% javascripts %}" and "{% javascripts %}" blocks and it's done.
{% javascripts injector="angular" %}
<script type="text/javascript" src="{{ asset_url }}"></script>
{% endjavascripts %}
{% stylesheets injector="angular" %}
<script type="text/javascript" src="{{ asset_url }}"></script>
{% stylesheets %}
If you have other bundles with angular assets dependency, you can easily create an assetic_injector.json file for them, and all assets under the "angular" tag will be automatically injected.