same like task02 only written in angularjs