Reference a static template in symfony2

夙愿已清 提交于 2019-12-01 10:30:01

Simple make a template without twig tags, and a route for it to load via ajax. No controller is required

my_template:
    path: /path/to/template
    defaults:
        _controller: FrameworkBundle:Template:template
        template: 'AcmeBundle:Angular:template.html.twig'

More infos: http://symfony.com/doc/current/cookbook/templating/render_without_controller.html

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!