try to separate code on angular