When included minified versions of app, service and controllers javascript files, the page is blank and I get this error:
Uncaught Error: [$injector:modulerr] Failed to instantiate module fieldunderwriting due to:
Error: [$injector:unpr] Unknown provider: a
I searched and found this: http://docs.angularjs.org/tutorial/step_05#controller_a-note-on-minification
I tried both options here’s the code for controllers.js from option 2
var fieldunderwritingControllers = angular.module(‘fieldunderwritingControllers’, []);
// A simple controller that fetches a list of data from a service
function PetIndexCtrl($scope, PetService) {
// “Pets” is a service returning mock data (services.js)
$scope.pets = PetService.all();
}
fieldunderwritingControllers.controller(‘PetIndexCtrl’, [’$scope’, ‘PetService’, PetIndexCtrl]);
// A simple controller that shows a tapped item’s data
function PetDetailCtrl($scope, $stateParams, PetService) {
// “Pets” is a service returning mock data (services.js)
$scope.pet = PetService.get($stateParams.petId);
}
fieldunderwritingControllers.controller(‘PetDetailCtrl’, [’$scope’, ‘$stateParams’, ‘PetService’, PetDetailCtrl]);
My app.js file has this:
var fieldunderwriting = angular.module(‘fieldunderwriting’, [‘ionic’, ‘fieldunderwritingServices’, ‘fieldunderwritingControllers’])
I’m not sure why I’m still getting the error when using minified javascript files.