a faily comprehensive angularjs exaample - difficulty -> moderate