Some changes in the structure (avoind use of $scope).
Some changes in the structure.
Adding resolve to the routerProvider to load data before the controller gets ready