Crud Angular
Development of an application with Angular 10, it was developed a simple application of a book register (CRUD) with Creation, Reading, Update and Exclusion of books.
Challenges and learning acquired during development: The main concepts of Angular 10: Components, Directives, Pipes, Services, RxJS, use of material and etc.
Angular requires the following items:
As our main focus is the frontend part so to simplify the backend and we will use JSOM SERVE
npm i json-server
json-server read the file that we will create (db.json) that will contain an object with all the endPoints and create an API based on this file.
We must create a file inside the backend folder that we will call (db.json) that will work as a database.
We must open the file and type the objects with all API endpoints.
{
"books": [
{
"id": 1,
"name": "O Pequeno Princie",
"author": "Pedro de Alcantra",
"price": 5.89
},
{
"id": 2,
"name": "O Rei e o rato",
"author": "Jose de Anchieta",
"price": "6"
},
{
"id": 3,
"name": "O Rei leao",
"author": "Jose de Anchieta",
"price": "7"
}
]
}