This appears like an undeniable layout, particularly if originating from a Rails foundation. However, once the application starts to scale, this layout causes numerous folders to be open immediately. Whether utilizing Visual Studio, Sublime, or Vim with Nerd Tree, a considerable time is spent scrolling through the directory tree.
2. Dependency injection: It is one of the best AngularJS's patterns and makes testing much more straightforward, and in addition making it all the more clear whereupon any specific object depends. AngularJS is extremely adaptable on how things can be injected. The most straightforward rendition requires simply passing the name of the dependency into the function for the module.
It is crystal clear MainCtrl relies on $scope and $timeout. How does AngularJS know what MainCtrl relies on? AngularJS gives an exceptionally basic solution for this; pass the conditions as a variety of strings, with the final element of the array being a function which takes all the conditions as parameters.
3. Global dependencies: When creating AngularJS applications, there will be a reliance on an object that binds itself to the worldwide scope. This implies it's accessible in any AngularJS code, however, this breaks the dependency injection model and prompts a couple issues, particularly in testing. AngularJS makes it easy to epitomize these globals into modules so they can be infused like standard AngularJS modules.
4. Controller bloat: Controllers are the sauce and potatoes of AngularJS applications. It's simple, particularly when beginning, to put an excess of rationale in the controller. Controllers should never do DOM control or hold DOM selectors; that is the place where directives and utilizing ng-model come in. Similarly, business rationale should live in services rather than controllers.
5. Not using Batarang: Batarang is a superb Chrome extension for creating and troubleshooting AngularJS applications. It offers Model browsing to get a look inside what Angular has resolved to be the models bound to scopes. This can be helpful when working with mandates and to confine scopes to see where qualities are bound.