Single page web app using angular, require, and webapi