Code-for-America-Projects-Hub icon indicating copy to clipboard operation
Code-for-America-Projects-Hub copied to clipboard

Switch back to minified js in app, but make sure they don't break testing

Open jstirnaman opened this issue 9 years ago • 1 comments

In develop branch, minified JS does not work with testing framework without a workaround. Add a workaround and switch the app back to minified.

jstirnaman avatar Apr 07 '15 04:04 jstirnaman

It looks like the pattern for supporting minification is generally to use the expanded signature for modules. e.g. //Controllers var myController = function(anyVariableName, $http) {} myController.$inject = ['$scope', '$http']

//Modules var myModule = angular.module('myModule', [ //Dependencies go here as an array of strings.])

//Services myModule.service('serviceName', ['$http', '$location', function($http, $location) {}])

jstirnaman avatar Apr 14 '15 19:04 jstirnaman