Browse Source

Update list-service.md

pull/23275/head
Fahri Gedik 11 months ago
parent
commit
4b1358bf06
  1. 11
      docs/en/framework/ui/angular/list-service.md

11
docs/en/framework/ui/angular/list-service.md

@ -12,6 +12,7 @@
import { ListService } from '@abp/ng.core'; import { ListService } from '@abp/ng.core';
import { BookDto } from '../models'; import { BookDto } from '../models';
import { BookService } from '../services'; import { BookService } from '../services';
import { inject } from '@angular/core';
@Component({ @Component({
/* class metadata here */ /* class metadata here */
@ -32,10 +33,10 @@ class BookComponent {
items: BookDto[] = []; items: BookDto[] = [];
count = 0; count = 0;
constructor( public readonly list = inject(ListService);
public readonly list: ListService, private bookService = inject(BookService);
private bookService: BookService,
) { constructor() {
// change ListService defaults here // change ListService defaults here
this.list.maxResultCount = 20; this.list.maxResultCount = 20;
} }
@ -78,7 +79,7 @@ You can extend the query parameter of the `ListService`'s `hookToQuery` method.
Firstly, you should pass your own type to `ListService` as shown below: Firstly, you should pass your own type to `ListService` as shown below:
```typescript ```typescript
constructor(public readonly list: ListService<BooksSearchParamsDto>) { } public readonly list = inject(ListService<BooksSearchParamsDto>);
``` ```
Then update the `bookStreamCreator` constant like following: Then update the `bookStreamCreator` constant like following:

Loading…
Cancel
Save