我对AngularJS很新。我已经阅读了有关此主题的几篇帖子,但仍无法通过ng-include
获取数据这是我的html和js代码
JS
.controller('TabsDemoCtrl', function ($scope, $window) {
$scope.tabs = [
{
title:'Home',
content:"test.html"
},
{
title:'Profile',
content:"test.html"
},
{
title:'Messages',
content:"test.html"
},
{
title:'Settings',
content:"test.html"
}
];
})
HTML
<div class="card-body card-padding" data-ng-controller="TabsDemoCtrl">
<tabset vertical="true">
<tab ng-repeat="tab in tabs" heading="{{tab.title}}" active="tab.active" disable="tab.disabled">
<div ng-include="tab.content"></div>
</tab>
</tabset>
</div>
的test.html
<h1>This is html file</h1>
我不知道问题是什么,以及为什么没有加载test.html。有人可以帮我找出问题吗?