Browse Source

docs: refactor response type

add new screenshots to angular tutorial part 2
pull/1633/head
mehmet-erim 7 years ago
parent
commit
0952eaae87
  1. 7
      docs/en/Tutorials/Angular/Part-I.md
  2. 8
      docs/en/Tutorials/Angular/Part-II.md

7
docs/en/Tutorials/Angular/Part-I.md

@ -446,14 +446,15 @@ First, create data types to map data returning from the backend (you can check s
Modify the `books.ts` as shown below: Modify the `books.ts` as shown below:
```typescript ```typescript
import { ABP } from '@abp/ng.core';
export namespace Books { export namespace Books {
export interface State { export interface State {
books: Response; books: Response;
} }
export type Response = ABP.PagedResponse<Book>; export interface Response {
items: Book[];
totalCount: number;
}
export interface Book { export interface Book {
name: string; name: string;

8
docs/en/Tutorials/Angular/Part-II.md

@ -540,6 +540,10 @@ Open `book-list.component.html` and modify the `ngbDropdownMenu` for add the del
</div> </div>
``` ```
The final actions dropdown UI looks like this:
![bookstore-final-actions-dropdown](images/bookstore-final-actions-dropdown.png)
### Open Confirmation Popup ### Open Confirmation Popup
Open `book-list.component.ts` and inject the `ConfirmationService` for show confirmation popup. Open `book-list.component.ts` and inject the `ConfirmationService` for show confirmation popup.
@ -570,3 +574,7 @@ delete(id: string, name: string) {
``` ```
The `delete` method shows confirmation popup and listens to them. When close the popup, the subscribe block runs. If confirmed this popup, it will dispatch the `DeleteBook` action. The `delete` method shows confirmation popup and listens to them. When close the popup, the subscribe block runs. If confirmed this popup, it will dispatch the `DeleteBook` action.
The confirmation popup looks like this:
![bookstore-confirmation-popup](images/bookstore-confirmation-popup.png)

Loading…
Cancel
Save