{"id":822,"date":"2024-03-02T10:31:57","date_gmt":"2024-03-02T03:31:57","guid":{"rendered":"https:\/\/thoaicoder.com\/?p=822"},"modified":"2024-03-09T13:42:52","modified_gmt":"2024-03-09T06:42:52","slug":"build-a-crud-app-with-angular","status":"publish","type":"post","link":"https:\/\/thoaicoder.com\/index.php\/2024\/03\/02\/build-a-crud-app-with-angular\/","title":{"rendered":"Build a CRUD app with Angular"},"content":{"rendered":"\n<h1 class=\"wp-block-heading\">1. Introduction<\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">In the realm of modern web development, creating dynamic and interactive applications is essential to meet the demands of users. Angular, a popular front-end framework maintained by Google, provides developers with a robust set of tools and features to build such applications efficiently. One common requirement in web development is the need for CRUD operations &#8211; Create, Read, Update, and Delete &#8211; to manage data within an application.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In this guide, we will embark on a journey to develop a CRUD (Create, Read, Update, Delete) product application using Angular14, Nx, Material UI, and RxJS. We&#8217;ll leverage Angular&#8217;s powerful capabilities to create a seamless user experience for managing products within our application. <\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"574\" src=\"https:\/\/thoaicoder.com\/wp-content\/uploads\/2024\/03\/bandicam2024-03-0912-58-48-822-ezgif.com-video-to-gif-converter-2.gif\" alt=\"\" class=\"wp-image-886\"\/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">2. How the app works?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Our app implements CRUD operators for the product data of a company, the product schema is:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Id<\/strong>: id of product<\/li>\n\n\n\n<li><strong>CompanyId<\/strong>: the company owns this product<\/li>\n\n\n\n<li><strong>Name<\/strong>: product name<\/li>\n\n\n\n<li><strong>Category<\/strong>: product&#8217;s category (one of the predefined categories: &#8220;Drink&#8221;, &#8220;Food&#8221;, &#8220;Electronic &#8220;, &#8220;Book&#8221;)<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Below is the initial product data which belongs to two companies (companyId= 1 and companyId= 2)<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"576\" height=\"175\" src=\"https:\/\/thoaicoder.com\/wp-content\/uploads\/2024\/03\/image-2.png\" alt=\"\" class=\"wp-image-828\" srcset=\"https:\/\/thoaicoder.com\/wp-content\/uploads\/2024\/03\/image-2.png 576w, https:\/\/thoaicoder.com\/wp-content\/uploads\/2024\/03\/image-2-300x91.png 300w\" sizes=\"auto, (max-width: 576px) 100vw, 576px\" \/><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">The app contains only one screen &#8211; product management accessed via the URL: <em>http:\/\/localhost:4200\/company\/{companyId}\/products<\/em>, the CRUD functions and corresponding backend API are:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>GET \/company\/{companyId}\/products?category={category}&amp;name={name}<\/td><td>Load products by company id, name and category<\/td><\/tr><tr><td>POST \/company\/{companyId}\/products<\/td><td>Create new product<\/td><\/tr><tr><td>PUT \/company\/{companyId}\/products\/{id}<\/td><td>Update a product<\/td><\/tr><tr><td>DELETE \/company\/{companyId}\/products\/{id}<\/td><td>Delete a product<\/td><\/tr><tr><td>GET \/company\/{companyId}\/categories<\/td><td>Get categories<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h1 class=\"wp-block-heading\">3. Tech stack<\/h1>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Nx<\/strong>: manage and build Angular app (<a href=\"https:\/\/thoaicoder.com\/index.php\/2023\/12\/30\/managing-multiple-angular-application-with-nx-monorepo\/\">learn more<\/a>)<\/li>\n\n\n\n<li><strong>Material UI<\/strong>: reusable UI component (<a href=\"https:\/\/thoaicoder.com\/index.php\/2024\/01\/06\/using-google-material-design-in-angular\/\">learn more<\/a>)<\/li>\n\n\n\n<li><strong>RxJS<\/strong>: handle asynchronous operations, we will use it to call backend API<\/li>\n\n\n\n<li><strong>Docker<\/strong>: start backend API (I built this mock API in order to demostrate this article, the Docker image is publish on <a href=\"https:\/\/hub.docker.com\/repository\/docker\/thoainguyen842\/mock-api\/general\">my Docker hub<\/a>)<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Majority of our project contains 3 components and a service to interact with backend API as below.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"263\" height=\"403\" src=\"https:\/\/thoaicoder.com\/wp-content\/uploads\/2024\/03\/image-4.png\" alt=\"\" class=\"wp-image-845\" srcset=\"https:\/\/thoaicoder.com\/wp-content\/uploads\/2024\/03\/image-4.png 263w, https:\/\/thoaicoder.com\/wp-content\/uploads\/2024\/03\/image-4-196x300.png 196w\" sizes=\"auto, (max-width: 263px) 100vw, 263px\" \/><\/figure>\n\n\n\n<h1 class=\"wp-block-heading\">4. Using RxJS to call RESTful API<\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">Before creating some components to display product data, we need to create a service to interact with backend API using RxJS.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>product.service.ts<\/em><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1001\" height=\"637\" src=\"https:\/\/thoaicoder.com\/wp-content\/uploads\/2024\/03\/image-3.png\" alt=\"\" class=\"wp-image-844\" srcset=\"https:\/\/thoaicoder.com\/wp-content\/uploads\/2024\/03\/image-3.png 1001w, https:\/\/thoaicoder.com\/wp-content\/uploads\/2024\/03\/image-3-300x191.png 300w, https:\/\/thoaicoder.com\/wp-content\/uploads\/2024\/03\/image-3-768x489.png 768w\" sizes=\"auto, (max-width: 1001px) 100vw, 1001px\" \/><\/figure>\n\n\n\n<h1 class=\"wp-block-heading\">5. Components design<\/h1>\n\n\n\n<h2 class=\"wp-block-heading\">5.1. List product component<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">This component takes responsibility for loading and displaying product table based on companyId on the URL and supports searching products by name and category. We use <strong>ActivatedRoute <\/strong>to extract companyId from the URL, after that we will call backend API to:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Load categories from companyId<\/li>\n\n\n\n<li>Load all products from companyId. Not that the <strong>loadProducts <\/strong>method requires three parameters: <strong>companyId, category, productName<\/strong>. At this step, we will load all products of the company by passing productName = &#8221; and selectedCategory = &#8221;<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><em>list-product.component.ts<\/em><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"969\" height=\"1019\" src=\"https:\/\/thoaicoder.com\/wp-content\/uploads\/2024\/03\/image-5.png\" alt=\"\" class=\"wp-image-846\" srcset=\"https:\/\/thoaicoder.com\/wp-content\/uploads\/2024\/03\/image-5.png 969w, https:\/\/thoaicoder.com\/wp-content\/uploads\/2024\/03\/image-5-285x300.png 285w, https:\/\/thoaicoder.com\/wp-content\/uploads\/2024\/03\/image-5-768x808.png 768w\" sizes=\"auto, (max-width: 969px) 100vw, 969px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><em>list-product.component.html<\/em><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"831\" src=\"https:\/\/thoaicoder.com\/wp-content\/uploads\/2024\/03\/image-6-1024x831.png\" alt=\"\" class=\"wp-image-851\" srcset=\"https:\/\/thoaicoder.com\/wp-content\/uploads\/2024\/03\/image-6-1024x831.png 1024w, https:\/\/thoaicoder.com\/wp-content\/uploads\/2024\/03\/image-6-300x243.png 300w, https:\/\/thoaicoder.com\/wp-content\/uploads\/2024\/03\/image-6-768x623.png 768w, https:\/\/thoaicoder.com\/wp-content\/uploads\/2024\/03\/image-6.png 1085w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">To implement the search product function, we create two variables <strong>productName<\/strong> and <strong>selectedCategory <\/strong>then bind them to the input and select-option on HTML. After that, when the user hits the &#8220;Search&#8221; button we just need to call the <strong>loadProducts()<\/strong> function to perform the search.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"549\" height=\"348\" src=\"https:\/\/thoaicoder.com\/wp-content\/uploads\/2024\/03\/image-8.png\" alt=\"\" class=\"wp-image-854\" srcset=\"https:\/\/thoaicoder.com\/wp-content\/uploads\/2024\/03\/image-8.png 549w, https:\/\/thoaicoder.com\/wp-content\/uploads\/2024\/03\/image-8-300x190.png 300w\" sizes=\"auto, (max-width: 549px) 100vw, 549px\" \/><\/figure>\n<\/div>\n\n\n<h2 class=\"wp-block-heading\">5.2. Add product component<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">This component is used for both create and edit product functions via a dialog as below. <\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"526\" height=\"446\" src=\"https:\/\/thoaicoder.com\/wp-content\/uploads\/2024\/03\/image-9.png\" alt=\"\" class=\"wp-image-857\" srcset=\"https:\/\/thoaicoder.com\/wp-content\/uploads\/2024\/03\/image-9.png 526w, https:\/\/thoaicoder.com\/wp-content\/uploads\/2024\/03\/image-9-300x254.png 300w\" sizes=\"auto, (max-width: 526px) 100vw, 526px\" \/><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">We will build this component based on Material Dialog, bascically the add-product component consumes some data passed to MAT_DIALOG_DATA:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>categories<\/strong>: to build the category drop-down<\/li>\n\n\n\n<li><strong>product<\/strong>: to display product info for the update product function<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">We will use<a href=\"https:\/\/angular.io\/guide\/reactive-forms\"> Angular Reactive forms<\/a> which is a model-driven approach to handling form inputs whose values change over time to build the product form containing two fields: product name and category<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>add-product.component.ts<\/em><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"517\" height=\"848\" src=\"https:\/\/thoaicoder.com\/wp-content\/uploads\/2024\/03\/image-10.png\" alt=\"\" class=\"wp-image-858\" srcset=\"https:\/\/thoaicoder.com\/wp-content\/uploads\/2024\/03\/image-10.png 517w, https:\/\/thoaicoder.com\/wp-content\/uploads\/2024\/03\/image-10-183x300.png 183w\" sizes=\"auto, (max-width: 517px) 100vw, 517px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">add-product.component.html<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"886\" height=\"473\" src=\"https:\/\/thoaicoder.com\/wp-content\/uploads\/2024\/03\/image-11.png\" alt=\"\" class=\"wp-image-862\" srcset=\"https:\/\/thoaicoder.com\/wp-content\/uploads\/2024\/03\/image-11.png 886w, https:\/\/thoaicoder.com\/wp-content\/uploads\/2024\/03\/image-11-300x160.png 300w, https:\/\/thoaicoder.com\/wp-content\/uploads\/2024\/03\/image-11-768x410.png 768w\" sizes=\"auto, (max-width: 886px) 100vw, 886px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">On the list product component, we create a <strong>openProductDialog <\/strong>method with <strong>product <\/strong>parameter to open the addProduct dialog and perform the create\/update product respectively:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>When the user hits the update product button we will pass the selected product to this method<\/li>\n\n\n\n<li>when hitting the create product button we won&#8217;t pass any argument to this method <\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><em>list-product.component.ts<\/em><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"926\" height=\"615\" src=\"https:\/\/thoaicoder.com\/wp-content\/uploads\/2024\/03\/image-12.png\" alt=\"\" class=\"wp-image-864\" srcset=\"https:\/\/thoaicoder.com\/wp-content\/uploads\/2024\/03\/image-12.png 926w, https:\/\/thoaicoder.com\/wp-content\/uploads\/2024\/03\/image-12-300x199.png 300w, https:\/\/thoaicoder.com\/wp-content\/uploads\/2024\/03\/image-12-768x510.png 768w\" sizes=\"auto, (max-width: 926px) 100vw, 926px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">5.3. Delete product component<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">We will create a reusable confirm dialog to implement the delete function. When hitting Yes the DELETE product API will be called.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"424\" height=\"212\" src=\"https:\/\/thoaicoder.com\/wp-content\/uploads\/2024\/03\/image-14.png\" alt=\"\" class=\"wp-image-875\" srcset=\"https:\/\/thoaicoder.com\/wp-content\/uploads\/2024\/03\/image-14.png 424w, https:\/\/thoaicoder.com\/wp-content\/uploads\/2024\/03\/image-14-300x150.png 300w\" sizes=\"auto, (max-width: 424px) 100vw, 424px\" \/><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\"><em>confirm-dialog.component.ts<\/em><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"673\" height=\"817\" src=\"https:\/\/thoaicoder.com\/wp-content\/uploads\/2024\/03\/image-13.png\" alt=\"\" class=\"wp-image-874\" srcset=\"https:\/\/thoaicoder.com\/wp-content\/uploads\/2024\/03\/image-13.png 673w, https:\/\/thoaicoder.com\/wp-content\/uploads\/2024\/03\/image-13-247x300.png 247w\" sizes=\"auto, (max-width: 673px) 100vw, 673px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><em>list-product.component.ts<\/em><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"774\" height=\"472\" src=\"https:\/\/thoaicoder.com\/wp-content\/uploads\/2024\/03\/image-15.png\" alt=\"\" class=\"wp-image-876\" srcset=\"https:\/\/thoaicoder.com\/wp-content\/uploads\/2024\/03\/image-15.png 774w, https:\/\/thoaicoder.com\/wp-content\/uploads\/2024\/03\/image-15-300x183.png 300w, https:\/\/thoaicoder.com\/wp-content\/uploads\/2024\/03\/image-15-768x468.png 768w\" sizes=\"auto, (max-width: 774px) 100vw, 774px\" \/><\/figure>\n\n\n\n<h1 class=\"wp-block-heading\">6. Conclusion<\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">Building a CRUD application with Angular involves leveraging the framework&#8217;s powerful features, including components, services, routing, and RxJS. Through this article, we gain practical experience in creating a full-fledged web application that interacts with a backend server to perform basic CRUD operations on data. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">By mastering Angular&#8217;s concepts and leveraging its features effectively, developers can build dynamic and interactive user interfaces that deliver a seamless user experience. This demo application can be found on&nbsp;<a href=\"https:\/\/github.com\/ThoaiNguyenHuu842\/angular_product_management\">GitHub<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>1. Introduction In the realm of modern web development, creating dynamic and interactive applications is [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":824,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[18,17,54],"class_list":["post-822","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-web-development","tag-angular","tag-material-design","tag-rxjs"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v19.14 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Build a CRUD app with Angular - I \u2764 Code<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/thoaicoder.com\/index.php\/2024\/03\/02\/build-a-crud-app-with-angular\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Build a CRUD app with Angular - I \u2764 Code\" \/>\n<meta property=\"og:description\" content=\"1. Introduction In the realm of modern web development, creating dynamic and interactive applications is [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/thoaicoder.com\/index.php\/2024\/03\/02\/build-a-crud-app-with-angular\/\" \/>\n<meta property=\"og:site_name\" content=\"I \u2764 Code\" \/>\n<meta property=\"article:published_time\" content=\"2024-03-02T03:31:57+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-03-09T06:42:52+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/thoaicoder.com\/wp-content\/uploads\/2024\/03\/crud.webp\" \/>\n\t<meta property=\"og:image:width\" content=\"800\" \/>\n\t<meta property=\"og:image:height\" content=\"420\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/webp\" \/>\n<meta name=\"author\" content=\"Thoai\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Thoai\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/thoaicoder.com\/index.php\/2024\/03\/02\/build-a-crud-app-with-angular\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/thoaicoder.com\/index.php\/2024\/03\/02\/build-a-crud-app-with-angular\/\"},\"author\":{\"name\":\"Thoai\",\"@id\":\"https:\/\/thoaicoder.com\/#\/schema\/person\/a3304c209434f63c501b05622d7d2720\"},\"headline\":\"Build a CRUD app with Angular\",\"datePublished\":\"2024-03-02T03:31:57+00:00\",\"dateModified\":\"2024-03-09T06:42:52+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/thoaicoder.com\/index.php\/2024\/03\/02\/build-a-crud-app-with-angular\/\"},\"wordCount\":743,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/thoaicoder.com\/#\/schema\/person\/a3304c209434f63c501b05622d7d2720\"},\"keywords\":[\"Angular\",\"Material design\",\"RxJS\"],\"articleSection\":[\"Web development\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/thoaicoder.com\/index.php\/2024\/03\/02\/build-a-crud-app-with-angular\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/thoaicoder.com\/index.php\/2024\/03\/02\/build-a-crud-app-with-angular\/\",\"url\":\"https:\/\/thoaicoder.com\/index.php\/2024\/03\/02\/build-a-crud-app-with-angular\/\",\"name\":\"Build a CRUD app with Angular - I \u2764 Code\",\"isPartOf\":{\"@id\":\"https:\/\/thoaicoder.com\/#website\"},\"datePublished\":\"2024-03-02T03:31:57+00:00\",\"dateModified\":\"2024-03-09T06:42:52+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/thoaicoder.com\/index.php\/2024\/03\/02\/build-a-crud-app-with-angular\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/thoaicoder.com\/index.php\/2024\/03\/02\/build-a-crud-app-with-angular\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/thoaicoder.com\/index.php\/2024\/03\/02\/build-a-crud-app-with-angular\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/thoaicoder.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Build a CRUD app with Angular\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/thoaicoder.com\/#website\",\"url\":\"https:\/\/thoaicoder.com\/\",\"name\":\"I \u2764 Code\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/thoaicoder.com\/#\/schema\/person\/a3304c209434f63c501b05622d7d2720\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/thoaicoder.com\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/thoaicoder.com\/#\/schema\/person\/a3304c209434f63c501b05622d7d2720\",\"name\":\"Thoai\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/thoaicoder.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/thoaicoder.com\/wp-content\/uploads\/2023\/03\/photo_2023-01-05_22-53-32.jpg\",\"contentUrl\":\"https:\/\/thoaicoder.com\/wp-content\/uploads\/2023\/03\/photo_2023-01-05_22-53-32.jpg\",\"width\":640,\"height\":640,\"caption\":\"Thoai\"},\"logo\":{\"@id\":\"https:\/\/thoaicoder.com\/#\/schema\/person\/image\/\"},\"sameAs\":[\"https:\/\/thoaicoder.com\",\"https:\/\/www.linkedin.com\/in\/huu-thoai-nguyen\/\"],\"url\":\"https:\/\/thoaicoder.com\/index.php\/author\/admin_cvyxq4b8\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Build a CRUD app with Angular - I \u2764 Code","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/thoaicoder.com\/index.php\/2024\/03\/02\/build-a-crud-app-with-angular\/","og_locale":"en_US","og_type":"article","og_title":"Build a CRUD app with Angular - I \u2764 Code","og_description":"1. Introduction In the realm of modern web development, creating dynamic and interactive applications is [&hellip;]","og_url":"https:\/\/thoaicoder.com\/index.php\/2024\/03\/02\/build-a-crud-app-with-angular\/","og_site_name":"I \u2764 Code","article_published_time":"2024-03-02T03:31:57+00:00","article_modified_time":"2024-03-09T06:42:52+00:00","og_image":[{"width":800,"height":420,"url":"https:\/\/thoaicoder.com\/wp-content\/uploads\/2024\/03\/crud.webp","type":"image\/webp"}],"author":"Thoai","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Thoai","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/thoaicoder.com\/index.php\/2024\/03\/02\/build-a-crud-app-with-angular\/#article","isPartOf":{"@id":"https:\/\/thoaicoder.com\/index.php\/2024\/03\/02\/build-a-crud-app-with-angular\/"},"author":{"name":"Thoai","@id":"https:\/\/thoaicoder.com\/#\/schema\/person\/a3304c209434f63c501b05622d7d2720"},"headline":"Build a CRUD app with Angular","datePublished":"2024-03-02T03:31:57+00:00","dateModified":"2024-03-09T06:42:52+00:00","mainEntityOfPage":{"@id":"https:\/\/thoaicoder.com\/index.php\/2024\/03\/02\/build-a-crud-app-with-angular\/"},"wordCount":743,"commentCount":0,"publisher":{"@id":"https:\/\/thoaicoder.com\/#\/schema\/person\/a3304c209434f63c501b05622d7d2720"},"keywords":["Angular","Material design","RxJS"],"articleSection":["Web development"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/thoaicoder.com\/index.php\/2024\/03\/02\/build-a-crud-app-with-angular\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/thoaicoder.com\/index.php\/2024\/03\/02\/build-a-crud-app-with-angular\/","url":"https:\/\/thoaicoder.com\/index.php\/2024\/03\/02\/build-a-crud-app-with-angular\/","name":"Build a CRUD app with Angular - I \u2764 Code","isPartOf":{"@id":"https:\/\/thoaicoder.com\/#website"},"datePublished":"2024-03-02T03:31:57+00:00","dateModified":"2024-03-09T06:42:52+00:00","breadcrumb":{"@id":"https:\/\/thoaicoder.com\/index.php\/2024\/03\/02\/build-a-crud-app-with-angular\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/thoaicoder.com\/index.php\/2024\/03\/02\/build-a-crud-app-with-angular\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/thoaicoder.com\/index.php\/2024\/03\/02\/build-a-crud-app-with-angular\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/thoaicoder.com\/"},{"@type":"ListItem","position":2,"name":"Build a CRUD app with Angular"}]},{"@type":"WebSite","@id":"https:\/\/thoaicoder.com\/#website","url":"https:\/\/thoaicoder.com\/","name":"I \u2764 Code","description":"","publisher":{"@id":"https:\/\/thoaicoder.com\/#\/schema\/person\/a3304c209434f63c501b05622d7d2720"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/thoaicoder.com\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/thoaicoder.com\/#\/schema\/person\/a3304c209434f63c501b05622d7d2720","name":"Thoai","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/thoaicoder.com\/#\/schema\/person\/image\/","url":"https:\/\/thoaicoder.com\/wp-content\/uploads\/2023\/03\/photo_2023-01-05_22-53-32.jpg","contentUrl":"https:\/\/thoaicoder.com\/wp-content\/uploads\/2023\/03\/photo_2023-01-05_22-53-32.jpg","width":640,"height":640,"caption":"Thoai"},"logo":{"@id":"https:\/\/thoaicoder.com\/#\/schema\/person\/image\/"},"sameAs":["https:\/\/thoaicoder.com","https:\/\/www.linkedin.com\/in\/huu-thoai-nguyen\/"],"url":"https:\/\/thoaicoder.com\/index.php\/author\/admin_cvyxq4b8\/"}]}},"_links":{"self":[{"href":"https:\/\/thoaicoder.com\/index.php\/wp-json\/wp\/v2\/posts\/822","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/thoaicoder.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/thoaicoder.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/thoaicoder.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/thoaicoder.com\/index.php\/wp-json\/wp\/v2\/comments?post=822"}],"version-history":[{"count":25,"href":"https:\/\/thoaicoder.com\/index.php\/wp-json\/wp\/v2\/posts\/822\/revisions"}],"predecessor-version":[{"id":887,"href":"https:\/\/thoaicoder.com\/index.php\/wp-json\/wp\/v2\/posts\/822\/revisions\/887"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/thoaicoder.com\/index.php\/wp-json\/wp\/v2\/media\/824"}],"wp:attachment":[{"href":"https:\/\/thoaicoder.com\/index.php\/wp-json\/wp\/v2\/media?parent=822"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/thoaicoder.com\/index.php\/wp-json\/wp\/v2\/categories?post=822"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/thoaicoder.com\/index.php\/wp-json\/wp\/v2\/tags?post=822"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}