Angular practice with a http://docs.angularjs.org/cookbook example