I've encountered an issue with angular-xeditable on my Angular app. While it functions properly in the development environment, I'm facing an error in production when all JS files are minified:
Uncaught Error: [$injector:strictdi] http://errors.angularjs.org/1.3.5/$injector/strictdi?p0=function(n)
Upon inspecting my code, it seems that there might be a problem with xeditable. Below is the app creation code written in CoffeeScript:
# initialize the angular app
angular.module 'dbManagerApp', ['xeditable', 'ngDraggable']
# set the theme for xeditable
.run (editableOptions, editableThemes) ->
# set the default theme
editableOptions.theme = 'default'
# customize the ok button
editableThemes['default'].submitTpl = '<div class="small primary btn"><input type="submit" value="Ok" /></div>'
# customize the cancel button
editableThemes['default'].cancelTpl = '<div class="small warning btn" ng-click="$form.$cancel()"><a href="#">Cancel</a></div>'
Here's the minified version of the above code:
(function(){angular.module("dbManagerApp",["xeditable","ngDraggable"]).run(function(n,t){if(!_.isUndefined(n||_.isUndefined(n.theme)))return n.theme="default",t["default"].submitTpl='<div class="small primary btn"><input type="submit" value="Ok" /><\/div>',t["default"].cancelTpl='<div class="small warning btn" ng-click="$form.$cancel()"><a href="#">Cancel<\/a><\/div>'})}).call(this);
//# sourceMappingURL=DbManagerApp.min.js.map
If I comment out the code inside the run method, it resolves the exception being thrown. This method is utilized to configure xeditable as specified in the documentation. I'm puzzled by this abnormal behavior. Is there a way to verify if xeditable was successfully incorporated into the Angular app or should I look into something else?