diff --git a/docs/src/content/docs/challenges/angular/5-crud.md b/docs/src/content/docs/challenges/angular/5-crud.md index 4fde176..881fff3 100644 --- a/docs/src/content/docs/challenges/angular/5-crud.md +++ b/docs/src/content/docs/challenges/angular/5-crud.md @@ -14,13 +14,13 @@ WIP: The following documentation will be reviewed and improved. However, you can ## Information -Communicating and having a global/local state in sync with your backend is the heart of any application. You will need to master those following best practises to build strong and reliable Angular Application. +Communicating and having a global/local state in sync with your backend is the heart of any application. You will need to master these following best practises to build strong and reliable Angular Applications. ## Statement -In this exercice, you have a small CRUD application, which get a list of TODOS, update and delete some todo. +In this exercice, you have a small CRUD application, which get a list of TODOS, update and delete some todos. -Currently we have a working exemple but filled with lots of bad practices. +Currently we have a working example but filled with lots of bad practices. ### Step 1: refactor with best practices @@ -28,7 +28,7 @@ What you will need to do: - Avoid **any** as a type. Using Interface to leverage Typescript type system prevent errors - Use a **separate service** for all your http calls and use a **BehaviourSubject** for your todoList -- Use **AsyncPipe** to suscribe to your todo list. _(Let you handle subscription, unsuscription and refresh of the page when data has changed)_, avoir manual subscribe when it's not needed +- Use **AsyncPipe** to subscribe to your todo list. _(Lets you handle subscription, unsubscription and refresh of the page when data has changed)_, avoid manual subscribe when it's not needed - Don't **mutate** data ```typescript @@ -44,7 +44,7 @@ this.todos = [...this.todos.filter((t) => t.id !== todoUpdated.id), todoUpdated] ### Step 2: Improve - Add a **Delete** button: _Doc of fake API_ -- Handle **errors** correctly. _(Globaly)_ +- Handle **errors** correctly. _(Globally)_ - Add a Global **loading** indicator. _You can use MatProgressSpinnerModule_ ### Step 3: Maintainability!! add some test