My Angular 1 code works fine in development. But when I compress my Angular project to dist with Grunt, my directives run before my services and app.run(), which results in breaking the page.
I traced the issue to uglify which changes the code execution order. I don't know how to prevent my uglify from changing the execution order.