forked from angular/in-memory-web-api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
in-memory-web-api.module.js.map
1 lines (1 loc) · 2.99 KB
/
in-memory-web-api.module.js.map
1
{"version":3,"file":"in-memory-web-api.module.js","sourceRoot":"","sources":["in-memory-web-api.module.ts"],"names":[],"mappings":"OAAO,EAAE,QAAQ,EAAE,QAAQ,EAA6B,MAAM,eAAe;OACtE,EAAE,UAAU,EAAE,MAAM,eAAe;OAEnC,EAEL,qBAAqB,EACrB,sBAAsB,EACtB,iBAAiB,EAClB,MAAM,6BAA6B;AAEpC,sCAAsC;AACtC,8CACE,QAAkB,EAClB,SAA4B,EAC5B,OAA8B;IAE9B,IAAI,OAAO,GAAQ,IAAI,sBAAsB,CAAC,QAAQ,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC;IAC5E,MAAM,CAAc,OAAQ,CAAC;AAC/B,CAAC;AAGD;IAAA;IAiCA,CAAC;IAhCC;;;;;;;;;;MAUE;IACK,4BAAO,GAAd,UAAe,SAAkC,EAAE,OAAmC;QACpF,MAAM,CAAC;YACL,QAAQ,EAAE,oBAAoB;YAC9B,SAAS,EAAE;gBACT,EAAE,OAAO,EAAE,iBAAiB,EAAG,QAAQ,EAAE,SAAS,EAAE;gBACpD,EAAE,OAAO,EAAE,qBAAqB,EAAE,QAAQ,EAAE,OAAO,EAAE;aACtD;SACF,CAAC;IACJ,CAAC;IACI,+BAAU,GAA0B;QAC3C,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;oBACvB,0BAA0B;oBAC1B,kDAAkD;oBAClD,SAAS,EAAE,CAAE,EAAE,OAAO,EAAE,UAAU;4BACnB,UAAU,EAAE,6BAA6B;4BACzC,IAAI,EAAE,CAAC,QAAQ,EAAE,iBAAiB,EAAE,qBAAqB,CAAC,EAAC,CAAE;iBAC7E,EAAG,EAAE;KACL,CAAC;IACF,kBAAkB;IACX,mCAAc,GAAmE,cAAM,OAAA,EAC7F,EAD6F,CAC7F,CAAC;IACF,2BAAC;AAAD,CAAC,AAjCD,IAiCC","sourcesContent":["import { Injector, NgModule, ModuleWithProviders, Type } from '@angular/core';\nimport { XHRBackend } from '@angular/http';\n\nimport {\n InMemoryBackendConfigArgs,\n InMemoryBackendConfig,\n InMemoryBackendService,\n InMemoryDbService\n} from './in-memory-backend.service';\n\n// AoT requires factory to be exported\nexport function inMemoryBackendServiceFactory(\n injector: Injector,\n dbService: InMemoryDbService,\n options: InMemoryBackendConfig\n): XHRBackend {\n let backend: any = new InMemoryBackendService(injector, dbService, options);\n return (<XHRBackend>backend);\n}\n\n\nexport class InMemoryWebApiModule {\n /**\n * Prepare in-memory-web-api in the root/boot application module\n * with class that implements InMemoryDbService and creates an in-memory database.\n *\n * @param {Type} dbCreator - Class that creates seed data for in-memory database. Must implement InMemoryDbService.\n * @param {InMemoryBackendConfigArgs} [options]\n *\n * @example\n * InMemoryWebApiModule.forRoot(dbCreator);\n * InMemoryWebApiModule.forRoot(dbCreator, {useValue: {delay:600}});\n */\n static forRoot(dbCreator: Type<InMemoryDbService>, options?: InMemoryBackendConfigArgs): ModuleWithProviders {\n return {\n ngModule: InMemoryWebApiModule,\n providers: [\n { provide: InMemoryDbService, useClass: dbCreator },\n { provide: InMemoryBackendConfig, useValue: options },\n ]\n };\n }\nstatic decorators: DecoratorInvocation[] = [\n{ type: NgModule, args: [{\n // Must useFactory for AoT\n // https://github.com/angular/angular/issues/11178\n providers: [ { provide: XHRBackend,\n useFactory: inMemoryBackendServiceFactory,\n deps: [Injector, InMemoryDbService, InMemoryBackendConfig]} ]\n}, ] },\n];\n/** @nocollapse */\nstatic ctorParameters: () => ({type: any, decorators?: DecoratorInvocation[]}|null)[] = () => [\n];\n}\n\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\n}\n"]}