make it posibil to use a default angular controller for api calls