import { MockProductService } from './mock.product.service' ; import { ProductService } from './product.service' ; export function productServiceFactory ( isProd ) { if ( isProd ) { return new ProductService ( ) ; } else { return new MockProductService ( ) ; } }