In many instances in the tutorials and examples, the code will have trouble with magnification. Perhaps it would be best to use examples that explicitly solve this problem? Otherwise, developers are going to have trouble with magnification or be forced to use ngmin.
I am using minification with my Ionic project and all my code uses minification-safe syntax. I get an error on trying to load my first page:
Error: [ng:areq] Argument 'fn' is not a function, got string
This is in my minified vendors.js file so it’s unlikely to come from my scripts folder containing my controllers and models and other JS files. This is a snippet from the vendors.js file where the error apparently comes from:
encodeURIComponent(h(arguments[c]));return new Error(b)}}
You are correct, there is a misplaced closing bracket in my code. I’ve updated it now.
I can’t tell you quite what might be wrong. I ran into a lot of those on my first run with minification. I literally went through the app line be line finding each injection issue. It was kind of painful. Lesson learned - run minification every build and see what fails.
You are absolutely right. It was an oversight on my part: I forgot to rewrite the http interceptor I was using inside the config block. After a few hours of confusion, I finally caught it
Yes, the config and routing section was where I had most of my troubles as well. Keep on top of it by testing with minification so another injection problem doesn’t sneak in.