Javascript ajax调用期间Angular.js智能表加载符号

Javascript ajax调用期间Angular.js智能表加载符号,javascript,angularjs,jsp,Javascript,Angularjs,Jsp,在使用pipe/ajax插件示例时,我一直在尝试在ajax调用仍在加载时实现一个带有加载指示器的Angular.js智能表 angular-boostrap.js var eposWebAngularStrutsApp = angular.module('eposWebAngularStrutsApp', ['ngResource','smart-table']); angular-controller.js eposWebAngularStrutsApp.controller('StoreH

在使用pipe/ajax插件示例时,我一直在尝试在ajax调用仍在加载时实现一个带有加载指示器的Angular.js智能表

angular-boostrap.js

var eposWebAngularStrutsApp = angular.module('eposWebAngularStrutsApp', ['ngResource','smart-table']);
angular-controller.js

eposWebAngularStrutsApp.controller('StoreHealthCheckController', ['$scope','StoreServerHealth', function ($scope, StoreServerHealth) {
    //http://www.sitepoint.com/creating-crud-app-minutes-angulars-resource/

    var ctrl = this;
    this.displayed = [];

    this.callServer = function callServer(tableState) {

        ctrl.isLoading = true;
        StoreServerHealth.query(function(result) {          
            ctrl.displayed = result.data;
            ctrl.isLoading = false;
          }); //query() returns all the entries    
    };  

}]);
angular-service.js

eposWebAngularStrutsApp.factory('StoreServerHealth', function($resource) {
      return $resource('json/storeHealthCheckList.action'); // Note the full endpoint address
    }); 
我的JSP

<table class="table table-striped" st-pipe="mc.callServer" st-table="mc.displayed" ng-controller="StoreHealthCheckController">
    <thead>
    <tr>
        <th>Store</th>
        <th>Server</th>
        <th>Conn Status</th>
        <th>Last Updated</th>
        <th>MDI</th>
        <th>Last Synched (MDI)</th>
        <th>DSM</th>
        <th>Last Synched (DSM)</th>
        <th>Trading Status</th>
        <th>Build</th>
    </tr>
    </thead>
    <tbody ng-show="!mc.isLoading">
    <tr ng-repeat="row in mc.displayed">
        <td>{{row.locationId}}</td>
        <td>{{row.clientId}}</td>
        <td>{{row.status}}</td>
        <td>{{row.displayLastUpdateTime}}</td>
        <td>{{row.replicationStatus}}</td>
        <td>{{row.displayLastReplicationSyncTime}}</td>
        <td>{{row.dsmReplicationStatus}}</td>
        <td>{{row.dsmLastSynchTime}}</td>
        <td>{{row.storeTradingStatus}}</td>
        <td>{{row.buildVersion}}</td>   
    </tr>
    </tbody>
    <tbody ng-show="mc.isLoading">
    <tr>
        <td colspan="10" class="text-center">Loading ... </td>
    </tr>   
    </tbody>
</table>
但我一直收到一个错误TypeError:href为null firebug/content/debugger/stackFrame/stackFrame.js

有人能告诉我我可能做错了什么吗


谢谢

上面的评论就是这个问题的答案。我忘了给控制器加别名。

为什么控制器没有别名?我想你应该把这个:ng controller=StoreHealthCheckController添加为mc