docs: remove rest-service.md and updated the service proxies documentation

pull/3308/head
mehmet-erim 5 years ago
parent f7f7462e7c
commit 6e86f0385f

@ -1,3 +0,0 @@
## Rest Service
TODO

@ -25,9 +25,9 @@ The files generated with the `--module all` option like below:
### Services
Each generated service matches a back-end controller. The services methods call back-end APIs via [RestService](./Rest-Service.md).
Each generated service matches a back-end controller. The services methods call back-end APIs via [RestService](./HTTP-Requests.md#restservice).
<!-- A variable named `apiName` is defined in each service. `apiName` matches the module's RemoteServiceName. This variable passes to the `RestService` as a parameter at each request. It matches the key of `apis` object in the environment. If there is no microservice API defined in the environment, `RestService` uses the default. -->
A variable named `apiName` (available as of v2.4) is defined in each service. `apiName` matches the module's RemoteServiceName. This variable passes to the `RestService` as a parameter at each request. If there is no microservice API defined in the environment, `RestService` uses the default. See [getting a specific API endpoint from application config](HTTP-Requests#how-to-get-a-specific-api-endpoint-from-application-config)
The `providedIn` property of the services is defined as `'root'`. Therefore no need to add a service as a provider to a module. You can use a service by injecting it into a constructor as shown below:
@ -64,4 +64,4 @@ Initial values can optionally be passed to each class constructor.
## What's Next?
* [Localization](./Localization.md)
* [Http Requests](./Http-Requests.md)
Loading…
Cancel
Save