当我从Admin.html里面的手风琴控制中呈现的新html无效时
angular.module('TabsApp', [])
.controller('TabsCtrl', ['$scope', function ($scope)
{
$scope.tabs = [{
title: 'Admin',
templateUrl: 'Views/Admin.html'
},
{
title: 'Data',
templateUrl: 'two.tpl.html'
},
{
title: 'Chart',
templateUrl: 'three.tpl.html'
},
{
title: 'DashBoard',
templateUrl: 'four.tpl.html'
}];
$scope.currentTab = 'Views/Admin.html';
$scope.onClickTab = function (tab) {
if (tab.title == 'Admin') {
$scope.currentTab = tab.templateUrl;
}
else {
$scope.currentTab = tab.templateUrl;
}
}
$scope.isActiveTab = function (tabUrl) {
return tabUrl == $scope.currentTab;
}
}]);