Javascript 角度使用ng include包含包含其他模板的模板

Javascript 角度使用ng include包含包含其他模板的模板,javascript,html,angularjs,angularjs-ng-include,Javascript,Html,Angularjs,Angularjs Ng Include,我正在我的应用程序中尝试包含一个包含其他模板的模板(已显示) index.html 任务概述 calendar_main-view.html 问题出现在ng include的第二级(文件calendar\u grid-view.html)上。浏览器不会执行任何xhr调用来包含该文件 怎么了?您缺少一个报价 <div ng-if="view.mode.list" ng-include="'app/components/calendar/calendar_list-view.htm

我正在我的应用程序中尝试包含一个包含其他模板的模板(已显示)

index.html

任务概述

calendar_main-view.html

问题出现在ng include的第二级(文件calendar\u grid-view.html)上。浏览器不会执行任何xhr调用来包含该文件


怎么了?

您缺少一个报价

 <div ng-if="view.mode.list" ng-include="'app/components/calendar/calendar_list-view.html'">

<div ng-if="view.mode.grid" ng-include="'app/components/calendar/calendar_grid-view.html'"></div>


确保
view.mode.list
view.mode.grid
evaluted to truthy以显示html。

我看不到标签下的关闭链接RIYAJ:(意思是你可以接受答案。别忘了向上投票:D:p
    <div class="col l10 offset-l1 m10 offset-m1 s10 offset-s1">

<!-- List view mode -->
<div ng-if="view.mode.list" ng-include="app/components/calendar/calendar_list-view.html">

</div>

<!-- Grid view mode -->
<div ng-if="view.mode.grid" ng-include="app/components/calendar/calendar_grid-view.html"></div>

</div>
 <div ng-if="view.mode.list" ng-include="'app/components/calendar/calendar_list-view.html'">

<div ng-if="view.mode.grid" ng-include="'app/components/calendar/calendar_grid-view.html'"></div>