turn outside history api calls into angular