I am currently working on a project that utilizes both AngularJS and Symfony, but I'm struggling to correctly define the path of a twig template in my JavaScript code.
I need to locate: -the original JS file -the template file -the JS path using assetic
...
+-src/
| +-MyCompany/
| +-MyBundle/
| +-Resources/
| +-public/
| +-js/
| +-directive/
| +-my_file.js
| +-view/
| +-template/
| my_template.html.twig
+-web/
| bundles/
| +-MyBundle/
| +-js/
| +-my_fil.js
...
This is the snippet of my JavaScript code:
return {
templateUrl: '?'
}
Therefore, I was wondering if there is a way to include a path from a bundle into an asset file? (I have already tried the @bundle/ notation without success). Or, perhaps how to ensure that the js included in my HTML uses the bundle's javascript rather than the one from the asset?
Any help would be greatly appreciated. Thank you!