### File

`src/app/shared/services/definition.service.ts`

### Index

###### Properties
Public resultText
###### Methods
getDefinitionService

### Constructor

`constructor(http: HttpClient)`
Defined in src/app/shared/services/definition.service.ts:13
Parameters :
Name | Type | Optional | Description
http | `HttpClient` |  |

### Methods

getDefinitionService
`getDefinitionService(word: string)`
Defined in src/app/shared/services/definition.service.ts:19
Parameters :
Name | Type | Optional | Description
word | `string` |  |
Returns : `Observable<>`

### Properties

Public resultText
`resultText: `IText``
Type : `IText`
Defined in src/app/shared/services/definition.service.ts:13

    import { Injectable, Inject } from '@angular/core';
    import { Http, Response, Headers } from '@angular/http';
    import { Observable } from 'rxjs/Observable';
    import { HttpClient, HttpErrorResponse } from '@angular/common/http';
    import { IText, IDefinition} from '../interface'
    import 'rxjs/add/operator/do';

    @Injectable()
    export class DefinitionService {

      public resultText: IText;

      constructor(private http: HttpClient) {
      }

      getDefinitionService(word: string): Observable<IDefinition> {
        return this.http.get<IDefinition>('/api/entries/' + word + '?source=WIKI')
          .do((res => console.log(res)));
      }

    }

# results matching ""

# No results matching ""