未捕获的ReferenceError:未定义angular度(使用testem)

在2个文件的第1行中find错误: – controllers.js – app.js

下面连同html一起附上。

当我启动本地服务器时,应用程序出现,但是input我的详细信息后,点击注册button无法login或注册。 这是404错误?

我也尝试将这两行添加到index.html文件(我认为是一些项目,我没有定义),但没有工作。

index.html文件

<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width"> <title></title> <link href="lib/ionic/css/ionic.css" rel="stylesheet"> <link href="css/style.css" rel="stylesheet"> *<!-- ionic/angularjs js -->* <script src="lib/ionic/js/ionic.bundle.js"></script> <script src="https://cdn.firebase.com/v0/firebase.js"></script> <!-- firebase --> <script src="https://cdn.firebase.com/libs/angularfire/0.5.0/angularfire.min.js"></script> <!-- angularfire --> <script src="https://cdn.firebase.com/v0/firebase-simple-login.js"></script> <!-- firebase-simple-login --> *<!-- cordova script (this will be a 404 during development) -->* <script src="cordova.js"></script> <!-- app's js --> <script src="js/app.js"></script> <script src="js/controllers.js"></script> </head> <body ng-app="bucketList" animation="slide-left-right-ios7"> <ion-nav-bar class="bar-stable nav-title-slide-ios7"> <ion-nav-back-button class="button-icon icon ion-chevron-left"> Back </ion-nav-back-button> </ion-nav-bar> <ion-nav-view></ion-nav-view> </body> </html> 

controllers.js文件 (错误在第一行)

 angular.module('bucketList.controllers', []) .controller('SignInCtrl', [ '$scope', '$rootScope', '$firebaseAuth', '$window', 

app.js文件(错误在第一行)

 angular.module('bucketList', ['ionic', 'firebase', 'bucketList.controllers']) 

错误说,你正在加载脚本之前尝试使用angular 。 我没有看到在您的index.html文件中的任何引用angularjs库。

所以在app.jscontroller.js之前添加一个angularjs的引用。

App.js

  angular.module('bucketList', ['ionic', 'firebase']) .run(function($ionicPlatform, $rootScope, $firebaseAuth, $firebase, $window, $ionicLoading) { $ionicPlatform.ready(function() { if (window.cordova && window.cordova.plugins.Keyboard) { cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true); } if (window.StatusBar) { StatusBar.styleDefault(); } 

controller.js

  angular.module('bucketList', []) .controller('SignInCtrl', [ '$scope', '$rootScope', '$firebaseAuth', '$window', function($scope, $rootScope, $firebaseAuth, $window) { $rootScope.checkSession(); $scope.user = { email: "", password: ""