angularjs for play functionality