These are chat archives for mwaylabs/generator-m-ionic

9th
Oct 2015
Mathias Maier
@MathiasTim
Oct 09 2015 07:57
Hey @LordWingZero, this is a linting 'issue' with eslint. We included a rule which checks if a global variable is used or not. Since using globals a lot in a project is not a recommended pattern, you have to add an exception as a comment like this /*global Camera*/ before you use Camera.DestinationType.DATA_URL for example. More here: http://eslint.org/docs/user-guide/configuring.html#specifying-globals
Victorio Berra
@VictorioBerra
Oct 09 2015 12:56
@MathiasTim I am not a fan of global variables either, however when you import a cordova plugin like 'cordova-plugin-camera' you pretty much dont get a choice right?
Mathias Maier
@MathiasTim
Oct 09 2015 13:01
@LordWingZero Depends on the plugin, with ngcordova you most of the time inject the plugin via the angular dependency injection process.
LimeBlast @LimeBlast waves
Daniel Hollands
@LimeBlast
Oct 09 2015 13:11
hey @MathiasTim, thank you for your answer to my question. if you don't follow johnpapa's style guide, do you have one of your own that you follow?
Mathias Maier
@MathiasTim
Oct 09 2015 13:14
@LimeBlast not really, sorry it's a bit of everything. We startet developing nearly 2 years ago and it evolved... (The module-structure for example is basically borrowed from johnpapa)
Daniel Hollands
@LimeBlast
Oct 09 2015 13:16
I'm toying with a few of the different generators out there, and like at least some of your approach, but some of it seems foregn to me - but i'm not yet a good enough JS dev to really know what I'm talking about
Jonathan Grupp
@gruppjo
Oct 09 2015 16:40
@LimeBlast, I've come to consider style guides a matter of taste which evolve naturally in teams (as opposed to good practices, caveats, patterns, ...). There's never a right solution. In my opinion the most important thing is that your team is committed to adhering to the same styles and eventually it's interesting to understand what the differences are.
Victorio Berra
@VictorioBerra
Oct 09 2015 19:47
@MathiasTim my original question contained examples from their very own documentation http://ngcordova.com/docs/plugins/camera/ there they use global variables that are not injected, and they even access the document directly which is almost certainly not the AngularJS way. So I just assumed this is life with AngularJS + Ionic.