angular-resource as component