change promise way
change angular directive