Angularjs Yeoman/angular注册页面中的页面进度条

Angularjs Yeoman/angular注册页面中的页面进度条,angularjs,progress-bar,yeoman,mean-stack,Angularjs,Progress Bar,Yeoman,Mean Stack,嗨,我只是在学习angular,我想知道是否有人能让我知道在Yeoman注册页面中设置这个简单的加载栏有什么不对 在signup.controller.js中,我有以下代码: 'use strict'; angular.module('lolBetApp') .controller('SignupCtrl', function ($scope, $http, Auth, $location) { $scope.user = {}; $scope.errors = {}; $scope.r

嗨,我只是在学习angular,我想知道是否有人能让我知道在Yeoman注册页面中设置这个简单的加载栏有什么不对

在signup.controller.js中,我有以下代码:

'use strict';

angular.module('lolBetApp')
  .controller('SignupCtrl', function ($scope, $http, Auth, $location) {
$scope.user = {};
$scope.errors = {};

$scope.register = function(form) {
  $scope.submitted = true;

  if(form.$valid) {
    Auth.createUser({
      summonerName: $scope.user.summonerName,
      email: $scope.user.email,
      password: $scope.user.password
    })
    .then( function() {
      // Account created, redirect to home
      $location.path('/');
    })
    .catch( function(err) {
      err = err.data;
      $scope.errors = {};

      // Update validity of form fields that match the mongoose errors
      angular.forEach(err.errors, function(error, field) {
        form[field].$setValidity('mongoose', false);
        $scope.errors[field] = error.message;
      });
    });
  }
};

$scope.$emit('LOAD')
$http.jsonp('http://filltext.com/?rows=10&delay=5&fname={firstName}&callback=JSON_CALLBACK')
.success(function(data){
  $scope.people=data;
  $scope.$emit('UNLOAD')
});

 }).
 controller('loaderController',['$scope',function($scope){
  $scope.$on('LOAD',function(){$scope.loading=true});
  $scope.$on('UNLOAD',function(){$scope.loading=false });
}]);
<div ng-controller="loaderController"> 
<div class="alert alert-info" ng-show="loading">Summoning...</div>
<div ng-controller="myController">
  <ul>
    <li ng-repeat="person in people">
      {{person.fname}}
    </li>
  </ul>
</div>
在我的signup.html中,我有以下代码:

'use strict';

angular.module('lolBetApp')
  .controller('SignupCtrl', function ($scope, $http, Auth, $location) {
$scope.user = {};
$scope.errors = {};

$scope.register = function(form) {
  $scope.submitted = true;

  if(form.$valid) {
    Auth.createUser({
      summonerName: $scope.user.summonerName,
      email: $scope.user.email,
      password: $scope.user.password
    })
    .then( function() {
      // Account created, redirect to home
      $location.path('/');
    })
    .catch( function(err) {
      err = err.data;
      $scope.errors = {};

      // Update validity of form fields that match the mongoose errors
      angular.forEach(err.errors, function(error, field) {
        form[field].$setValidity('mongoose', false);
        $scope.errors[field] = error.message;
      });
    });
  }
};

$scope.$emit('LOAD')
$http.jsonp('http://filltext.com/?rows=10&delay=5&fname={firstName}&callback=JSON_CALLBACK')
.success(function(data){
  $scope.people=data;
  $scope.$emit('UNLOAD')
});

 }).
 controller('loaderController',['$scope',function($scope){
  $scope.$on('LOAD',function(){$scope.loading=true});
  $scope.$on('UNLOAD',function(){$scope.loading=false });
}]);
<div ng-controller="loaderController"> 
<div class="alert alert-info" ng-show="loading">Summoning...</div>
<div ng-controller="myController">
  <ul>
    <li ng-repeat="person in people">
      {{person.fname}}
    </li>
  </ul>
</div>
我不需要使用Yeoman,也不需要使用此链接中的代码,就可以轻松完成此任务

有人知道我做错了什么吗


谢谢,

别客气!我刚开始工作。问题是我在signup.html页面中的控制器名称错误

 <div ng-controller="SignupCtrl">
  <ul>
    <li ng-repeat="person in people">
      {{person.fname}}
    </li>
  </ul>
</div>