Resource manager SPA in angular.js using the ofcourse API