angular-boilerplate
angular-boilerplate copied to clipboard
vm is considered bad practice
Check out the AngularUI style guide
Hi Dean, it's nice to see you here! :)
Just to make sure, is the title of the issue missing something from the beginning or are you refering to the whole thing?
I'm aware of certain things that could be better if done differently but decided not to do them so, to make sure it's easy to pick up for people relatively new to AngularJS. For instance, UI-Router is leaps and bounds ahead of ngRoute in terms of functionality but I decided not to implement it to keep things simple.
I think this project is a good starting point for people looking to build an application using AngularJS, which is the very purpose of it. It gives an example of how things could be organized without filling it with too many connected subjective decisions that would make changing the way things are organized trickier.
Would love to hear your suggestions on how things may be improved using this approach.
Once again, thanks for stopping byI
Sorry, vm
is considered a bad practice.
I don't think you should recommend the use of ngRoute because fundamentally there is no situation in which I would advocate it over uiRouter. You will start novices down a road that they will very quickly run into a wall with, and there are practices that come with uiRouter that impose good quality that are not easily achievable without uiRouter.
TL;DR: Go uiRouter or go home lol.
Hey merty,
I just found Your angular boilerplate and really like the simplicity of it. For most of my projects I don't need the overflow which most of other boilerplates or generators bring with them.
Regarding this issue I do not think that you should drop "vm". To be honest I never heard that it is bad style. There are many different style guides and some may not suggest "vm". But if you follow John Papa's, you are using "vm".
So, instead of dropping it, I want to encourage you to choose one style guide and to stay close to it. My favorite style guide is indeed John Papa's and it's already close to your style. So it wouldn't be much of effort to adapt it for this project.
JohnPapa's styleguide is a really bad styleguide that has a LOT of flaws and this is a general consensus by a large number of individuals on the AngularUI team. I was just choosing to avoid stating that explicitly in my initial post.
I think a statement like that requires evidence. A large number of people have adopted and use John Papa's style guide. I'm not saying it's beyond criticism, but if you're bringing criticism you should point out the flaws and the solutions. Blanket statements aren't entirely helpful.
@scarber777 more people have my code and repos in their project and there are already relevant issues on his repo but as soon as I can get to a computer I will see what I can find
@ProLoser that would be great. Thanks! I'm interested to see what you've found.
Released a new version today with some nice features and replaced the ngRoute with UI Router :)
19c195f47f40bc61e00239c573323a1ba97644c5