a homework for angularjs