2016-04-25 20 views
0

私のページにページングを実装しようとしていますが、次のエラーが発生しています。Angular Url-template throwsリソースが見つかりません

angular.min.js:87 GET http://localhost:56485/Areas/EVerify/Views/EVerify/dirPagination.tpl.html 404 (Not Found) 

JSファイル:CSHTMLで

var EVerifyModule = angular.module('EVerifyModule', ['angularFileUpload', 'ui.bootstrap', 'angularUtils.directives.dirPagination']); 

EVerifyModule.controller('EVerifyController', ['$scope', '$http', '$compile', function ($scope, $http, $compile) { 

          var EmployeeInfo = [ { 
          "name": "Daniel Cho", 
          "hireDate": "03/11/2016", 
          "responseDate": "03/13/2016", 
          "submitDate": "03/12/2016", 
          "authStatus": "Authorized", 
          "caseSatus": "Closed", 
          "phone": "+1 (213) 382-1115", 
          "authorized": true 
         } 
    ]; 

          $scope.EmployeeInfo = EmployeeInfo; 

          function initConfigurationClosedCases() { 
           sessionStorage.ModuleSelected = 'Closed Cases'; 
           LoadMenuInformation(); 
          } 

          }]); 

<div ng-controller="OtherController" class="other-controller"> 
           <small>this is in "OtherController"</small> 
           <div class="text-center"> 
            <dir-pagination-controls boundary-links="true" on-page-change="pageChangeHandler(newPageNumber)" template-url="/Areas/EVerify/Views/EVerify/dirPagination.tpl.html"></dir-pagination-controls> 
           </div> 
          </div> 

答えて

1

は、あなたのレイアウトの<head>

<base href="@Url.Content("~")"> 

で次の要素を追加してもスラッシュを省略/つまり、ファイルを参照するとき:

template-url="Areas/... 

最後に、私はあなたのプロジェクトのルートにフォルダを作成し、そこにあなたの角度.js.htmlファイルをホストするために示唆されています。サーバーがAreasフォルダー内の静的ファイルに対して要求をブロックする可能性があります。

関連する問題