Updated RestComponent to accept an injector