Mistakes AngularJS Developers Make
airpair.com
Mistakes AngularJS Developers Make
1–10 of 74 posts
Re: Mistakes AngularJS Developers Make
#2Every time I see it I just wonder aloud, what problem did you think this solved?
Re: Mistakes AngularJS Developers Make
#3Google has released a recommended app structure similar to this as well [0], though I haven't actually seen it being used too often in the projects I've come across.
[0] - https://docs.google.com/document/d/1XXMvReO8-Awi1EZXAXS4PzDz...
Re: Mistakes AngularJS Developers Make
#4Re: Mistakes AngularJS Developers Make
#5I've never understood the pattern of separating out services, controllers and directives into different modules. Your post controller is probably going to need your post service, so why put them in separate modules? Makes more sense to have a post module with your WYSIWYG directive, post service, post controller, etc. Every time I see it I just wonder aloud, what problem did you think this solved?
In my own experience, I've found taking such a modular approach too early on can actually hinder productivity as I find myself spending too much time on boilerplate and figuring out if, for example, this service REALLY belongs with feature X or feature Y.
Re: Mistakes AngularJS Developers Make
#6I really enjoy 1, 9 and 10. Learn something new everyday.
Re: Mistakes AngularJS Developers Make
#7Grouping files by feature has made navigating and reasoning about a codebase so much easier. I've even found myself grouping stylesheets & test files alongside templates and app code, it really helps enforce the idea of composing smaller apps together. Google has released a recommended app structure similar to this as well [0], though I haven't actually seen it being used too often in the projects I've come across. […
It's easier instead to just dump all of them into one place and copy that folder, no need to update references etc. then.
Any ideas on how to solve this?
Re: Mistakes AngularJS Developers Make
#8The modules one isn't necessarily true. I'm seeing a lot of Angular devs keep things under one module (esp for libraries). I don't think the value of multiple modules has really been realized. Exs: we do this for Angular Material and Ionic.
Re: Mistakes AngularJS Developers Make
#9It doesn't work for everything, though, so suddenly it blows up. So if you want to be 100% sure your code works as intended do it manually.
Re: Mistakes AngularJS Developers Make
#10Grouping files by feature has made navigating and reasoning about a codebase so much easier. I've even found myself grouping stylesheets & test files alongside templates and app code, it really helps enforce the idea of composing smaller apps together. Google has released a recommended app structure similar to this as well [0], though I haven't actually seen it being used too often in the projects I've come across. […
I understand the grouping of the JS files by feature. But I have a hard time including the partials/HTMLs with that. Because when building (concat, minify etc) the project, they will then need to be copied around and all template-references updated. It's easier instead to just dump all of them into one place and copy that folder, no need to update references etc. then. Any ideas on how to solve this?