modern-web-template icon indicating copy to clipboard operation
modern-web-template copied to clipboard

Angular JS error

Open ranraj opened this issue 8 years ago • 1 comments

There are some Angular JS error occurring in the master code. Some of my colleagues getting application up and running. I checked environment with them,but all same.

Environment details below. Scala : 2.11.8 Activator : 1.3.9 SBT : 0.13.11 *Error : * AppVersion.js:2 Uncaught ReferenceError: directivesModule is not defined UserCtrl.js:31 Uncaught ReferenceError: controllersModule is not defined CreateUserCtrl.js:33 Uncaught ReferenceError: controllersModule is not defined UpdateUserCtrl.js:54 Uncaught ReferenceError: controllersModule is not defined UserService.js:79 Uncaught ReferenceError: servicesModule is not defined angular.js:11655Error: [ng:areq] http://errors.angularjs.org/1.3.15/ng/areq?p0=UserCtrl&p1=not%20aNaNunction%2C%20got%20undefined at Error (native) at http://localhost:9000/assets/lib/angularjs/angular.min.js:6:417 at Rb (http://localhost:9000/assets/lib/angularjs/angular.min.js:19:510) at sb (http://localhost:9000/assets/lib/angularjs/angular.min.js:20:78) at http://localhost:9000/assets/lib/angularjs/angular.min.js:75:396 at chrome-extension://ighdmehidhipcmcojjgiloacoafjmpfk/dist/hint.js:951:22 at http://localhost:9000/assets/lib/angularjs/angular.min.js:57:100 at r (http://localhost:9000/assets/lib/angularjs/angular.min.js:7:408) at B (http://localhost:9000/assets/lib/angularjs/angular.min.js:56:471) at g (http://localhost:9000/assets/lib/angularjs/angular.min.js:51:335)(anonymous function) @ angular.js:11655

ranraj avatar Apr 05 '16 14:04 ranraj

There was an issue with coffee script loading order. Issue : The app.js (Generated) is not loaded before the UserCtrl.js. So, I got "directivesModule is not defined" error. Fix : Need to sort the javascripts : Seq[String] before loading the script files

Replace the below code in the index.html.scala line number 54. @for(script <- javascripts.sorted) {

ranraj avatar Apr 05 '16 14:04 ranraj