code resulting through a book about angular.js