mozilla/minion-frontend — pull request #111 by yeukhon (2013-08-22 00:13:40+00:00)
Title: Fixed #109. Dashboard has a <select> to choose which group to view. 

First, this commit requires https://github.com/mozilla/minion-backend/issues/215
to be fixed and commits to be pulled in.

This commit has several important changes:

**HomeController is rewritten**
I have a problem with the original code. I need to save the promise
to be able to kill in-progress $timeout. Once I factored out I also
experienced multiple requests were fired concurrently. I believe
this issue would have been fixed by applying the fix below, but
since I already rewrote I am not going to bother verify my theory.

**Remove controller from $routeProvider's when(..)**
In ``minion-main.js`` we specify some routes and for each when(..)
case we specify the controller. I started out with a new controller
called ``Ctrl`` and then once the new controller was completed,
I changed it back to ``HomeController``. I then noticed two
requests were made. My theory was the controller was called twice
and I was right. I reduced to a single index.html and a single
controller. A quick googling yield https://groups.google.com/forum/#!topic/angular/pXQrhrL84Xc
.

The fix is to remove controller from the when().

**Add a "Loading data.... cloak**
When we move away from one group to another there is a 2.5 second of wait time,
I introduced a simple "Loading data" visual (demo: just look at how
http://plnkr.co/ did it).

**Allow group selection in the dashboard view**
This is the original task of this ticket.

**Thoughts**
This ticket took me a long time. A total of two days of efforts to find all kinds of
problems in how we use angularJS. I am hoping in the upcoming weeks I can
improve my angularJS skill.