title: How to set up an AngularJS project to alternate between using different service implementations?
body: <p>I would like my Angular project to be able to switch between Demo and Live mode. There will be a switch somewhere to make this configuration change.</p>
  
  <p>I have about 10 service classes which all access external web services. In demo mode I would want these services to generate mock data locally instead of hitting the web services. Is there an elegant way to do this rather than add IF statements to all the services and adapt the behaviour in there?</p>
  
  <p>A nice seperation would be to have say a "Live" MeasurementService, and then a "Demo" DemoMeasurementService with the ability to swap between which service to use.</p>