I've tried to no avail. I'm considering converting this to an Angular service, but I'd prefer not to have to take the time that is going to require.