Usage of $resource to assign to current scope on completion.