@@ -20,12 +20,12 @@ By doing this the Collection gets automatically bound to the Agile Instance it w
2020const MY_COLLECTION = App .createCollection ();
2121```
2222There is also a way to use the plain ` Collection Class ` ,
23- but there we have to pass the ` Agile Instance ` , to which the Collection should get bound, beside the config .
23+ but there we have to pass the ` Agile Instance ` , to which the Collection should get bound.
2424``` ts
2525const MY_COLLECTION = new Collection (App );
2626```
2727Both instantiations lead to the same result, but we recommend using the former one.
28- After we have successfully created our first Collection, we can start using its powerful tools of it .
28+ After we have successfully created our first Collection, we can start using its powerful features .
2929``` ts
3030MY_COLLECTION .collect ({id: 1 , name: " jeff" }); // Add Item to Collection
3131MY_COLLECTION .remove (1 ).everywhere (); // Remove Item from Collection
@@ -38,12 +38,17 @@ MY_COLLECTION.collect({id: 1, name: "jeff"}).persist().removeGroup('myGroup').re
3838
3939### 🔨 Usage
4040
41- We might use a Collection, if we want to have an array of Todo Objects or Posts Objects.
41+ We might use a Collection, if we need a flexible array of Todo Objects.
4242``` ts
4343const TODOS = App .createCollection ();
44- TODOS .collect ({id: 1 , todo: " Clean bathroom" });
45- TODOS .collect ({id: 2 , todo: " Write Agile docs" });
44+ TODOS .collect ({id: 1 , todo: " Clean bathroom" }, [" user1" , " todayTodos" ]);
45+ TODOS .collect ({id: 2 , todo: " Write Agile docs" }, [" user1" ]);
46+ // <- cleand bathroom
47+ TODOS .remove (1 ).everywhere ();
4648```
49+ Here we create a ` TODO ` Collection and add two todos to it, which both get stored in the ` user1 ` [ Group] ( ./group/Introduction.md ) .
50+ Beside the ` user1 ` Group the todo with the id 1 gets also stored in the ` todayTodos ` Group.
51+ After we have successfully cleaned our bathroom, we remove the todo related to the id 1.
4752
4853### ⛳️ Sandbox
4954Test the Collection yourself, it's only one click away. Just select your preferred Framework below.
@@ -55,7 +60,7 @@ Test the Collection yourself, it's only one click away. Just select your preferr
5560
5661Each Data Object we add to our Collection, for example with the ` collect ` method,
5762gets transformed to an Item. This Item than gets stored in our Collection.
58- We can simply access each Item with the ` getItem ` method and the correct primary Key.
63+ We can simply access each Item with the ` getItem ` method and the fitting ` primary Key ` .
5964``` ts
6065MY_COLLECTION .getItem (/* primary Key */ ); // Returns Item at the primary Key
6166```
0 commit comments