Code samples from the ng-book