The solution of exercise from Alex L

In some cases will be useful to use ui-router (navigation views) and ngResource (for api), but I think in this case/exercise they be overkill.