From 90159a640175f814a038f973ba312eab3d45ee03 Mon Sep 17 00:00:00 2001 From: Ivo Stratev Date: Sat, 15 Oct 2016 22:29:33 +0300 Subject: [PATCH] [README] Code blocks that represent TypeScript fragments are now in TypeScript All code blocks that represent TypeScript fragments are now in TypeScript. --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 94d693f..73a4fa9 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ At minimum it must implement `createDb` which creates a "database" hash whose keys are collection names and whose values are arrays of collection objects to return or update. For example: -``` +```ts import { InMemoryDbService } from 'angular-in-memory-web-api'; export class InMemHeroService implements InMemoryDbService { @@ -57,7 +57,7 @@ export class InMemHeroService implements InMemoryDbService { Register this module and your service implementation in `AppModule.imports` calling the `forRoot` static method with this service class and optional configuration object: -``` +```ts // other imports import { HttpModule } from '@angular/http'; import { InMemoryWebApiModule } from 'angular-in-memory-web-api'; @@ -82,7 +82,7 @@ See examples in the Angular.io such as the Some features are not readily apparent in the basic usage example. The `InMemoryBackendConfigArgs` defines a set of options. Add them as the second `forRoot` argument: -``` +```ts InMemoryWebApiModule.forRoot(InMemHeroService, { delay: 500 }), ``` @@ -141,7 +141,7 @@ derived from the [HTTP Client](https://angular.io/docs/ts/latest/guide/server-co sample in the Angular documentation. Add the following line to `AppModule.imports` -``` +```ts InMemoryWebApiModule.forRoot(HeroDataService) ``` @@ -149,7 +149,7 @@ That file also has a `HeroDataOverrideService` derived class that demonstrates o the `parseUrl` method and an HTTP GET interceptor. Add the following line to `AppModule.imports` to see it in action: -``` +```ts InMemoryWebApiModule.forRoot(HeroDataOverrideService) ``` @@ -199,4 +199,4 @@ compiling your application project. - 'latest' [travis-badge]: https://travis-ci.org/angular/in-memory-web-api.svg?branch=master -[travis-badge-url]: https://travis-ci.org/angular/in-memory-web-api \ No newline at end of file +[travis-badge-url]: https://travis-ci.org/angular/in-memory-web-api