When coding a MVVM pattern I use Dependency Injection (DI) and try and code against interfaces. One of the common patterns is a Repository pattern, so I can swap my data storage provider. If I'm creating a web server side REST/ODATA API to server data to a MVVM/JavaScript/HTML UI, should I need to include a repository pattern in my MVVM JavaScript client code or just leave the repository pattern at the Web Server API level? I just can think of a 'Use Case' which would have me swapping out the Web Server API for another API at this stage. What do others do?
In my case I've chosen to implement AngularJS as the HTML/JavaScript MVVM client framework and Microsoft MVC WebAPI as the data/business logic service for Angular.