basic functionality of angular controller facilitating interaction with api working