Setting Up Angular 2 MockBackend

Todd Leininger Angular, JavaScript, Technology Snapshot, Tutorial 10 Comments

Todd was working on a client project developing one of the company’s first Angular 2 applications when he found that he needed access to the REST services before they were ready. He needed a good way to mock them up, so he set up a mock service for an Angular 2 application using MockBackend.

In this article Todd shows a step-by-step example of setting up a mock of RESTful web service APIs for an Angular 2 application using Angular’s MockBackend. With this method, he could then use that mock to work on the application before the real APIs were ready.