doc angular $resource couchapp