> For the complete documentation index, see [llms.txt](https://henryruhs.gitbook.io/ngx-crud/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://henryruhs.gitbook.io/ngx-crud/examples/services/singleton.md).

# Limited Singleton

Implementation for a singleton resource that is limited to `read` and `update` operations:

```typescript
import { Injectable, Injector } from '@angular/core';
import { Observable } from 'rxjs';
import
{
	ApiUrl,
	ApiRoute, 
	CommonService,
	CustomService,
	Options,
	OptionsWithBody
} from 'ngx-crud';
import { RequestBody, ResponseBody } from './example.interface';

import { environment } from '@environments';

@Injectable()
@ApiUrl(environment.apiUrl)
@ApiRoute(environment.apiRoutes.example)
export class ExampleService extends CommonService
{
	protected customService : CustomService<RequestBody, ResponseBody> = this.injector.get(CustomService);

	read(options ?: Options) : Observable<ResponseBody>
	{
		return this.customService.bind(this).custom('GET', options);
	}

	update(options ?: OptionsWithBody<ResponseBody>) : Observable<ResponseBody>
	{
		return this.customService.bind(this).custom('PUT', options);
	}
}
```
