meanjs/mean — pull request #76 by dylanjohnson (2014-05-25 15:07:34+00:00)
Title: Remove ng-init directive from article list.

According to the [AngularJS Docs](https://docs.angularjs.org/api/ng/directive/ngInit), the `ng-init` directive should only be used for aliasing special properties of ngRepeat.

This PR replaces the unintended usage of ngInit with a safer convention: using a private function to populate the Articles list on initialization of the Controller.

With the current implementation, this does mean an extra call to list the articles in states where it's not appropriate (i.e. CRUD states). Ideally, the ArticlesController would be split into two smaller controllers that handled only one concern (`ArticleController` for single item CRUD, `ArticleListController` for listing all articles and batch actions). This split would prevent the extra server call in CRUD states. This PR refrains from such refactoring because it seemed too large for a single PR. If implementation of this split is preferred before merge, I'd be happy to revise.