I am working on an Angular Project, on local it runs perfectly, but when I deploy to Divshot it breaks, and it throws an 'Unknown provider: iProvider <- i' error.
This is the link to the: Divshot development build
Any advice will be very appreciated.
It is because Angular resolves the provider names by literally converting a function into string and using its parameter names. When you deploy, you are probably minifying your code. Therefore something that looked like
myCoolServicewill be minified toioraor something else.You have to ways to solve it: 1. Use array syntax 2. Use ngAnnotate or something else in your build to create the array syntax for you.
Read the part about Minification on https://docs.angularjs.org/tutorial/step_05