This is an good exercise that helped me how to set up an Angular app, how to implement a directive, and how to set up routing to use set views.
See [Notes.txt] (Notes.txt) for extra notes, and follow Thinkful's Tutorial if you want to try it yourself. They do skip through a lot of the email logic, but they make a good review of Angular concepts.
What I'm trying to build
After following through the tutorial, I was able to get the json data containing mock emails to render. However, the life of me I couldn't get one of the modules (ngSanitize) to inject into my app properly, which is pretty vital for one of the directives they had us implementing. It's mostly finished except for that feature.
##Getting it working with ng-app, ng-controller, and $routeProvider
Code
Result
Basic File Structure
Setting up routes using $routeProvider
##Linking controllers and factories
InboxFactory holds commonly used functions. You can use $http module to load json files in angular. It returns a promise.
InboxCtrl calls the factory's getMessages function
A more fleshed out InboxFactory; note how the Angular's q promise works.
More fleshed out File Structure
Set up your directive's controller and link it to the templateUrl
set up your directive's template html.
Another directive example for the email view. not that angular.bind() is used to return the then() function that is bound to this.
$location.path changes the url and redirects you to that page
$routeParams gives us access to what's after the colon in your url.