Resources with associations, computed values and offline support for AngularJS