I previously used the asoc/assetic-angular-js-bundle
(GitHub) which, when used with an assetic filter config, meant all of the partials and the script were be combined into one file.
Their github page says to use the following in your twig template..
{% javascripts filter="angular"
'@BundleName/Resources/views/aTemplate.html.ng'
'@BundleName/Resources/views/fooTemplate.html.ng'
'@BundleName/Resources/views/moarTemplates/*.html.ng'
%}
<script type="text/javascript" src="{{ asset_url }}"></script>
{% endjavascripts %}
But if you use..
// app/config/config.yml
assetic:
filters:
angular:
apply_to: "\.ng$"
resource: %kernel.root_dir%/../vendor/asoc/assetic-angular-js-bundle
/Asoc/AsseticAngularJsBundle/Resources/config/assetic.xml
// This is all one line
// Not sure why this was needed, I vaguely remember
// assetic not being able to find to config
Then you can just call your partials in your twig javascripts section like so..
{% javascripts
'@BundleName/Resources/views/angular-app.js'
'@BundleName/Resources/views/angular-controllers.js'
'@BundleName/Resources/views/some-other-stuff.js'
'@BundleName/Resources/views/aTemplate.html.ng'
'@BundleName/Resources/views/fooTemplate.html.ng'
'@BundleName/Resources/views/moarTemplates/*.html.ng'
%}
<script type="text/javascript" src="{{ asset_url }}"></script>
{% endjavascripts %}
Then I guess you could either include the above in the one twig view that you want it to show or you could include it in all of your templates (depending on how you would want to deal with script caching and what not) and just call it using the regular ng-view
UserListController
type tags.
Sorry if this has no relevance to what you asked. At the start of me writing this it made so much sense but how that I've looked at it so much it looks like I've just gone off on a complete tangent.