2015-06-16 73 views

回答

3

我將腳本從home.html移到index.html,並從home.html中移除了ng-app。

<script> 

     app = angular.module('ui.bootstrap.demo', ['ui.bootstrap']); 
     angular.module('ui.bootstrap.demo').controller('TabsDemoCtrl', function ($scope, $window) { 
      $scope.tabs = [ 
       { title:'Home', content:'home content', url:'home.html' }, 
       { title:'Manage Users', content:'Manage Users content', url:'manageUsers.html'}, 
       { title:'Manage Configuration', content:'Manage Configuration content', url:'manageConfiguration.html'}, 
       { title:'Manage Server', content:'Manage Server content' , url:'manageServer.html'}, 
       { title:'Manage Audit', content:'Manage Audit content', url:'manageAudit.html'}, 
      ]; 
     }); 
     app.controller('personCtrl', function($scope) { 
     $scope.firstName = "John", 
     $scope.lastName = "Doe" 
     $scope.myVar = false; 
     $scope.toggle = function() { 
      $scope.myVar = !$scope.myVar; 
      } 
     }); 
    </script> 

對不起,我以前的愚蠢答案。

Updated & Working Plunker

+0

謝謝...它爲我工作。你有沒有這些類型的文件嗎? –

相關問題