我买了一个html / angular js模板,我尝试将它集成到symfony 2.指令ng-include似乎不起作用。
{# src/Neobe/AccueilBundle/Resources/views/layout.html.twig #} {% extends '::base.html.twig' %} {% block title %} Welcome {% endblock %} {% block body %} <!-- Wrapper--> <div id="wrapper"> <!-- Navigation --> <div ng-include="'views/common/navigation.html'"></div> <!-- Page wraper --> <!-- ng-class with current state name give you the ability to extended customization urview --> <div id="page-wrapper" class="gray-bg {[{$state.current.name}]}"> <!-- Page wrapper --> <div ng-include="'views/common/topnavbar.html'"></div> <!-- Main view --> <div ui-view></div> <!-- Footer --> <div ng-include="'views/common/footer.html'"></div> </div> </div> <!-- End page wrapper--> {% endblock %}包含模板layout.html.twig的布局位于我的bunlde Accueil的公共文件夹中:AccueilBundle / Resources / views / Accueil / layout.html.twig
navigation.html模板位于我的bunlde Accueil的公共文件夹中:AccueilBundle / Resources / views / Accueil / views / common / navigation.html
你能告诉我什么是错的吗?
我在浏览器中没有错误,但没有包含任何内容。
谢谢你的帮助。
I bought an html/angular js template and i try to integrated it in symfony 2. The directive ng-include seems to be not working.
{# src/Neobe/AccueilBundle/Resources/views/layout.html.twig #} {% extends '::base.html.twig' %} {% block title %} Welcome {% endblock %} {% block body %} <!-- Wrapper--> <div id="wrapper"> <!-- Navigation --> <div ng-include="'views/common/navigation.html'"></div> <!-- Page wraper --> <!-- ng-class with current state name give you the ability to extended customization urview --> <div id="page-wrapper" class="gray-bg {[{$state.current.name}]}"> <!-- Page wrapper --> <div ng-include="'views/common/topnavbar.html'"></div> <!-- Main view --> <div ui-view></div> <!-- Footer --> <div ng-include="'views/common/footer.html'"></div> </div> </div> <!-- End page wrapper--> {% endblock %}The layout which is included templates, layout.html.twig , is located in my public folder of my bunlde Accueil : AccueilBundle/Resources/views/Accueil/layout.html.twig
The navigation.html template is located in my public folder of my bunlde Accueil : AccueilBundle/Resources/views/Accueil/views/common/navigation.html
Can you tell me what's wrong ?
i have no error in the browser but nothing is included.
Thank u for your help.
最满意答案
AFAIK是ngInclude指令的语法
<div ng-include src="path_to_your_html"></div>要么
<ng-include src="path_to_your_html"></ng-include>AFAIK the syntax for the ngInclude directive is
<div ng-include src="path_to_your_html"></div>or
<ng-include src="path_to_your_html"></ng-include>更多推荐
发布评论