An exercise of angularJs