convert string to array angularjs