{"id":4131,"date":"2023-04-13T18:54:21","date_gmt":"2023-04-13T13:24:21","guid":{"rendered":"https:\/\/ripenapps.com\/blog\/?p=4131"},"modified":"2026-01-09T11:58:51","modified_gmt":"2026-01-09T06:28:51","slug":"how-to-build-progressive-web-apps-pwas-with-angularjs-15","status":"publish","type":"post","link":"https:\/\/ripenapps.com\/blog\/how-to-build-progressive-web-apps-pwas-with-angularjs-15\/","title":{"rendered":"How to Build Progressive Web Apps (PWAs) with AngularJS 15?"},"content":{"rendered":"<p>Platform-specific apps have been in the ecosystem for a long time. But, in recent times, build PWA with AngularJS web apps are\u00a0 grabbing momentum. It is due to the principle of &#8220;anyone, anywhere, on any device&#8221; with a single code base.<\/p>\n<p>Although you can pick from multiple technologies to build PWA, Angular stands apart from the other ones.<\/p>\n<p>Backed up by the creativity of Google, entrepreneurs are actively trusting the framework. Google continuously announced new innovations in Angular and <a href=\"https:\/\/ripenapps.com\/blog\/angular-15-major-features-deprecations-from-the-update\/\">\u00a0Angular 15<\/a> further enhancing the ease of developing PWs. If you are also planning to get started with Angular 15 and progressive web apps, here is tutorial to Build PWA with AngularJS 15.<\/p>\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_17 counter-hierarchy ez-toc-white\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" style=\"display: none;\"><i class=\"ez-toc-glyphicon ez-toc-icon-toggle\"><\/i><\/a><\/span><\/div>\n<nav><ul class=\"ez-toc-list ez-toc-list-level-1\"><li class=\"ez-toc-page-1 ez-toc-heading-level-2\"><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/ripenapps.com\/blog\/how-to-build-progressive-web-apps-pwas-with-angularjs-15\/#Why-opt-for-Progressive-Web-Apps\" title=\"Why opt for Progressive Web Apps?\">Why opt for Progressive Web Apps?<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-2\"><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/ripenapps.com\/blog\/how-to-build-progressive-web-apps-pwas-with-angularjs-15\/#Top-reasons-to-pick-Angular-15-for-PWA-development\" title=\"Top reasons to pick Angular 15 for PWA development\">Top reasons to pick Angular 15 for PWA development<\/a><ul class=\"ez-toc-list-level-3\"><li class=\"ez-toc-heading-level-3\"><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/ripenapps.com\/blog\/how-to-build-progressive-web-apps-pwas-with-angularjs-15\/#Flawless-JavaScript-support\" title=\"Flawless JavaScript support\">Flawless JavaScript support<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-3\"><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/ripenapps.com\/blog\/how-to-build-progressive-web-apps-pwas-with-angularjs-15\/#CLI-integration-makes-learning-easy\" title=\"CLI integration makes learning easy\">CLI integration makes learning easy<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-3\"><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/ripenapps.com\/blog\/how-to-build-progressive-web-apps-pwas-with-angularjs-15\/#Dependency-injection\" title=\"Dependency injection\">Dependency injection<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-3\"><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/ripenapps.com\/blog\/how-to-build-progressive-web-apps-pwas-with-angularjs-15\/#Architecture-advantage\" title=\"Architecture advantage\">Architecture advantage<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-3\"><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/ripenapps.com\/blog\/how-to-build-progressive-web-apps-pwas-with-angularjs-15\/#Support-from-Google\" title=\"Support from Google\">Support from Google<\/a><\/li><\/ul><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-2\"><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/ripenapps.com\/blog\/how-to-build-progressive-web-apps-pwas-with-angularjs-15\/#Setting-up-the-environment-to-build-PWA-with-AngularJS\" title=\"Setting up the environment to build PWA with AngularJS\">Setting up the environment to build PWA with AngularJS<\/a><ul class=\"ez-toc-list-level-3\"><li class=\"ez-toc-heading-level-3\"><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/ripenapps.com\/blog\/how-to-build-progressive-web-apps-pwas-with-angularjs-15\/#Installing-Nodejs-and-NPM\" title=\"Installing Node.js and NPM\">Installing Node.js and NPM<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-3\"><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/ripenapps.com\/blog\/how-to-build-progressive-web-apps-pwas-with-angularjs-15\/#Install-the-Angular-CLI-on-your-system\" title=\"Install the Angular CLI on your system\">Install the Angular CLI on your system<\/a><\/li><\/ul><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-2\"><a class=\"ez-toc-link ez-toc-heading-11\" href=\"https:\/\/ripenapps.com\/blog\/how-to-build-progressive-web-apps-pwas-with-angularjs-15\/#Install-Visual-Studio-on-your-system\" title=\"Install Visual Studio on your system\">Install Visual Studio on your system<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-2\"><a class=\"ez-toc-link ez-toc-heading-12\" href=\"https:\/\/ripenapps.com\/blog\/how-to-build-progressive-web-apps-pwas-with-angularjs-15\/#Install-Angular-CLI\" title=\"Install Angular CLI\">Install Angular CLI<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-2\"><a class=\"ez-toc-link ez-toc-heading-13\" href=\"https:\/\/ripenapps.com\/blog\/how-to-build-progressive-web-apps-pwas-with-angularjs-15\/#Install-GIT-to-your-system\" title=\"Install GIT to your system\">Install GIT to your system<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-2\"><a class=\"ez-toc-link ez-toc-heading-14\" href=\"https:\/\/ripenapps.com\/blog\/how-to-build-progressive-web-apps-pwas-with-angularjs-15\/#Building-PWA-with-AngularJS\" title=\"Building PWA with AngularJS\">Building PWA with AngularJS<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-2\"><a class=\"ez-toc-link ez-toc-heading-15\" href=\"https:\/\/ripenapps.com\/blog\/how-to-build-progressive-web-apps-pwas-with-angularjs-15\/#Conclusion\" title=\"Conclusion\">Conclusion<\/a><\/li><\/ul><\/nav><\/div>\n<h2><span class=\"ez-toc-section\" id=\"Why-opt-for-Progressive-Web-Apps\"><\/span>Why opt for Progressive Web Apps?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>PWAs deliver a native experience to the users. But the apps are very light in size, load faster, and pack rich features and functionalities. <a href=\"https:\/\/ripenapps.com\/angular-js-development\">Top angular js development companies<\/a> have registered stagnant growth in the demand for Angular-based PWAs from entrepreneurs. Why? It is because PWAs are:<\/p>\n<ul>\n<li aria-level=\"1\"><strong>Reliable:\u00a0<\/strong> Regardless of networking conditions, PWAs are able to launch and give users meaningful content.<\/li>\n<li aria-level=\"1\"><strong>Responsive:<\/strong> PWAs can adapt to multiple screen sizes, making them highly responsible. It also ensures a great user experience.<\/li>\n<li aria-level=\"1\"><strong>Engaging:<\/strong> Native apps were engaging, but with time, web apps have become more engaging. PWAs even get push notifications delivering similar benefits to Native apps. Brands that have built <a href=\"https:\/\/www.forbes.com\/sites\/theyec\/2019\/10\/23\/how-progressive-web-apps-will-change-online-business\/?sh=436775447370\">PWAs noted a 134% increase in impressions<\/a> with 137% higher engagement.<\/li>\n<li aria-level=\"1\"><strong>Secure:<\/strong> Developing, testing, and maintaining the PWAs comes with a high level of security. PWAs follow HTTPS protocols like any other web app.<\/li>\n<li aria-level=\"1\"><strong>Multi-platform:<\/strong> Whether you are using an Android, iOS, Mac, Windows, or Linux, you can deploy PWAs to all of them. That too with stable traffic on all platforms, although the Mobile sessions of <a href=\"https:\/\/web.dev\/progressive-web-apps\/\">PWAs registered an 80% increase<\/a>.<\/li>\n<\/ul>\n<h2><span class=\"ez-toc-section\" id=\"Top-reasons-to-pick-Angular-15-for-PWA-development\"><\/span>Top reasons to pick Angular 15 for PWA development<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>The advancement in the angular framework is why enterprises and startups choose angular for building PWA.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Flawless-JavaScript-support\"><\/span>Flawless JavaScript support<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>The framework work is enabled by JavaScript&#8217;s fascinating robust web app development. And JavaScript is well known for responsiveness. You can embed the rich library of JavaScript components into your PWA, making it an exceptional app.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"CLI-integration-makes-learning-easy\"><\/span>CLI integration makes learning easy<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Before CLI, it was tough to learn the Angular framework. However, Google considered this challenge and rolled out CLI to provide an easy development environment. CLI is a command line interface to build progressive web apps especially.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Dependency-injection\"><\/span>Dependency injection<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Angular eliminates the dependency of objects, becoming a unique feature for PWA development. However, there are times when objects require another module, yet the objects remain independent. Additionally, the code is maintainable and readable while build the PWA with AngularJS.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Architecture-advantage\"><\/span>Architecture advantage<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Angular does not use a Model view controller, instead, it uses a component-based architecture for development. This is why it is possible to split angular apps into independent functional components.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Support-from-Google\"><\/span>Support from Google<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>If you look at the documentation of Angular, you will find out how much focus Google has put on it. The documentation is comprehensive enabling developers to discover necessary information. Further, the credibility of Google in rolling out new updates has been stable since Angular was launched. Additionally, the community of developers stays active in case developers need help.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Setting-up-the-environment-to-build-PWA-with-AngularJS\"><\/span>Setting up the environment to build PWA with AngularJS<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Before getting started with the development part, it is crucial for you to set up the prerequisites required to build PWA with Angular.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Installing-Nodejs-and-NPM\"><\/span>Installing Node.js and NPM<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>The very first step is you need Node.js and NPM on your system. We are using Windows as our primary device. The steps for MAC and Linux might be different.<\/p>\n<p><strong>Step 1\u00a0<\/strong><\/p>\n<p>Head to <a href=\"https:\/\/nodejs.org\/en\/download\">https:\/\/nodejs.org\/en\/download<\/a> URL and click on Windows installer. Mac and Linux users have to click from the other two.<\/p>\n<p><img loading=\"lazy\" class=\"aligncenter wp-image-4132 size-large\" src=\"https:\/\/ripenapps.com\/blog\/wp-content\/uploads\/2023\/04\/image1-1024x496.png\" alt=\"Step 1\" width=\"735\" height=\"356\" srcset=\"https:\/\/ripenapps.com\/blog\/wp-content\/uploads\/2023\/04\/image1-1024x496.png 1024w, https:\/\/ripenapps.com\/blog\/wp-content\/uploads\/2023\/04\/image1-300x145.png 300w, https:\/\/ripenapps.com\/blog\/wp-content\/uploads\/2023\/04\/image1-768x372.png 768w, https:\/\/ripenapps.com\/blog\/wp-content\/uploads\/2023\/04\/image1-150x73.png 150w, https:\/\/ripenapps.com\/blog\/wp-content\/uploads\/2023\/04\/image1.png 1350w\" sizes=\"(max-width: 735px) 100vw, 735px\" \/><\/p>\n<p><strong>Step 2<\/strong><\/p>\n<p>Install Node.js on your system.<\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" class=\"aligncenter wp-image-4134 size-full\" src=\"https:\/\/ripenapps.com\/blog\/wp-content\/uploads\/2023\/04\/image3.png\" alt=\"Step 2 Install Node.js on your system. \" width=\"496\" height=\"384\" srcset=\"https:\/\/ripenapps.com\/blog\/wp-content\/uploads\/2023\/04\/image3.png 496w, https:\/\/ripenapps.com\/blog\/wp-content\/uploads\/2023\/04\/image3-300x232.png 300w, https:\/\/ripenapps.com\/blog\/wp-content\/uploads\/2023\/04\/image3-150x116.png 150w\" sizes=\"(max-width: 496px) 100vw, 496px\" \/><\/p>\n<p><strong>Step 3<\/strong><\/p>\n<p>Open Command Prompt and type node -v to verify if your Node Js&#8217; latest version is installed. Also, type the command npm -v to verify the Node package manager. The screen should look like this:<\/p>\n<p><img loading=\"lazy\" class=\" wp-image-4133 aligncenter\" src=\"https:\/\/ripenapps.com\/blog\/wp-content\/uploads\/2023\/04\/image2.png\" alt=\"Step 3 Open Command\" width=\"315\" height=\"97\" srcset=\"https:\/\/ripenapps.com\/blog\/wp-content\/uploads\/2023\/04\/image2.png 277w, https:\/\/ripenapps.com\/blog\/wp-content\/uploads\/2023\/04\/image2-150x46.png 150w\" sizes=\"(max-width: 315px) 100vw, 315px\" \/><\/p>\n<p><strong>Note:<\/strong> In case you see some other message instead of a version of Node.js, you have to <a href=\"https:\/\/www.geeksforgeeks.org\/how-to-resolve-node-is-not-recognized-as-an-internal-or-external-command-error-after-installing-node-js\/\">specify the Node.js path to the environment variable<\/a>.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Install-the-Angular-CLI-on-your-system\"><\/span>Install the Angular CLI on your system<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Once you have installed Node.js and NPM on your system, you also have to install Angular CLI. Here are the steps to do so.<\/p>\n<p><strong>Step 1<\/strong><\/p>\n<p>Open the terminal window and type \u201cnpm install -g @angular\/cli\u201d and the installation will start.<\/p>\n<p><img loading=\"lazy\" class=\"aligncenter wp-image-4135 \" src=\"https:\/\/ripenapps.com\/blog\/wp-content\/uploads\/2023\/04\/image5.png\" alt=\"Step 1 Open the terminal window\" width=\"703\" height=\"187\" srcset=\"https:\/\/ripenapps.com\/blog\/wp-content\/uploads\/2023\/04\/image5.png 806w, https:\/\/ripenapps.com\/blog\/wp-content\/uploads\/2023\/04\/image5-300x80.png 300w, https:\/\/ripenapps.com\/blog\/wp-content\/uploads\/2023\/04\/image5-768x204.png 768w, https:\/\/ripenapps.com\/blog\/wp-content\/uploads\/2023\/04\/image5-150x40.png 150w\" sizes=\"(max-width: 703px) 100vw, 703px\" \/><\/p>\n<p>Note: In case your NPM is an older version. You can use \u201cRun npm install -g npm@9.6.4 to update!\u201d to update your NPM to the latest version.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Install-Visual-Studio-on-your-system\"><\/span>Install Visual Studio on your system<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Visual Studio will be our default IDE to build PWA using AngularJS 15. Head to <a href=\"https:\/\/visualstudio.microsoft.com\/downloads\/\">https:\/\/visualstudio.microsoft.com\/downloads\/<\/a> and download it.<\/p>\n<p><img loading=\"lazy\" class=\"aligncenter wp-image-4136 size-large\" src=\"https:\/\/ripenapps.com\/blog\/wp-content\/uploads\/2023\/04\/image4-1024x469.png\" alt=\"Install Visual Studio on your system\" width=\"735\" height=\"337\" srcset=\"https:\/\/ripenapps.com\/blog\/wp-content\/uploads\/2023\/04\/image4-1024x469.png 1024w, https:\/\/ripenapps.com\/blog\/wp-content\/uploads\/2023\/04\/image4-300x137.png 300w, https:\/\/ripenapps.com\/blog\/wp-content\/uploads\/2023\/04\/image4-768x352.png 768w, https:\/\/ripenapps.com\/blog\/wp-content\/uploads\/2023\/04\/image4-150x69.png 150w, https:\/\/ripenapps.com\/blog\/wp-content\/uploads\/2023\/04\/image4.png 1264w\" sizes=\"(max-width: 735px) 100vw, 735px\" \/><\/p>\n<p>Mac and Linux users can download Visual Studio according to their operating system.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Install-Angular-CLI\"><\/span>Install Angular CLI<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Run the command npm install -g @npmcli\/fs in your terminal and wait for the installation to complete automatically.<\/p>\n<p><img loading=\"lazy\" class=\"aligncenter wp-image-4139 size-full\" src=\"https:\/\/ripenapps.com\/blog\/wp-content\/uploads\/2023\/04\/image7.png\" alt=\"Install Angular CLI\" width=\"452\" height=\"55\" srcset=\"https:\/\/ripenapps.com\/blog\/wp-content\/uploads\/2023\/04\/image7.png 452w, https:\/\/ripenapps.com\/blog\/wp-content\/uploads\/2023\/04\/image7-300x37.png 300w, https:\/\/ripenapps.com\/blog\/wp-content\/uploads\/2023\/04\/image7-150x18.png 150w\" sizes=\"(max-width: 452px) 100vw, 452px\" \/><\/p>\n<p>Note: Earlier, we used to type the command npm install -g @angular\/cli but the command has been moved to npm install -g @npmcli\/fs. This is why we are using the latest command to install Angular CLI.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Install-GIT-to-your-system\"><\/span>Install GIT to your system<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Here are the steps to install GIT on your system. We are using Windows as your default OS. If you are using Linux or Windows, you have to download specific versions.<\/p>\n<p>Step 1<\/p>\n<p>Head to <a href=\"https:\/\/gitforwindows.org\/\">https:\/\/gitforwindows.org\/<\/a> and click on download GIT.<\/p>\n<p><img loading=\"lazy\" class=\"aligncenter wp-image-4138 size-large\" src=\"https:\/\/ripenapps.com\/blog\/wp-content\/uploads\/2023\/04\/image6-1024x483.png\" alt=\"download GIT.\" width=\"735\" height=\"347\" srcset=\"https:\/\/ripenapps.com\/blog\/wp-content\/uploads\/2023\/04\/image6-1024x483.png 1024w, https:\/\/ripenapps.com\/blog\/wp-content\/uploads\/2023\/04\/image6-300x142.png 300w, https:\/\/ripenapps.com\/blog\/wp-content\/uploads\/2023\/04\/image6-768x362.png 768w, https:\/\/ripenapps.com\/blog\/wp-content\/uploads\/2023\/04\/image6-150x71.png 150w, https:\/\/ripenapps.com\/blog\/wp-content\/uploads\/2023\/04\/image6.png 1155w\" sizes=\"(max-width: 735px) 100vw, 735px\" \/><\/p>\n<p><strong>Step 2<\/strong><\/p>\n<p>Install the software by clicking next multiple times.<\/p>\n<p><img loading=\"lazy\" class=\"aligncenter wp-image-4141 size-full\" src=\"https:\/\/ripenapps.com\/blog\/wp-content\/uploads\/2023\/04\/image9.png\" alt=\"Step 2 Install the software\" width=\"494\" height=\"381\" srcset=\"https:\/\/ripenapps.com\/blog\/wp-content\/uploads\/2023\/04\/image9.png 494w, https:\/\/ripenapps.com\/blog\/wp-content\/uploads\/2023\/04\/image9-300x231.png 300w, https:\/\/ripenapps.com\/blog\/wp-content\/uploads\/2023\/04\/image9-150x116.png 150w\" sizes=\"(max-width: 494px) 100vw, 494px\" \/><\/p>\n<p>&nbsp;<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Building-PWA-with-AngularJS\"><\/span>Building PWA with AngularJS<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Now we are ready to build PWA with AngularJS 15. Follow the steps below to get started.<\/p>\n<p><strong>Step 1<\/strong><\/p>\n<p>Use the command ng new angular-pwa to create the app. The system will ask you for the default style sheet, and there you can specify CSS and press enter.<\/p>\n<p><img loading=\"lazy\" class=\"wp-image-4140 size-full\" src=\"https:\/\/ripenapps.com\/blog\/wp-content\/uploads\/2023\/04\/image8.png\" alt=\"Step 1 Use the command ng new angular-pwa \" width=\"754\" height=\"668\" srcset=\"https:\/\/ripenapps.com\/blog\/wp-content\/uploads\/2023\/04\/image8.png 754w, https:\/\/ripenapps.com\/blog\/wp-content\/uploads\/2023\/04\/image8-300x266.png 300w, https:\/\/ripenapps.com\/blog\/wp-content\/uploads\/2023\/04\/image8-150x133.png 150w\" sizes=\"(max-width: 754px) 100vw, 754px\" \/><\/p>\n<p><strong>Step 2<\/strong><\/p>\n<p>Change the command line directory to your PWA by using cd command.<\/p>\n<p><img loading=\"lazy\" class=\" wp-image-4144 aligncenter\" src=\"https:\/\/ripenapps.com\/blog\/wp-content\/uploads\/2023\/04\/image12-300x52.png\" alt=\"Step 2 Change the command \" width=\"392\" height=\"68\" srcset=\"https:\/\/ripenapps.com\/blog\/wp-content\/uploads\/2023\/04\/image12-300x52.png 300w, https:\/\/ripenapps.com\/blog\/wp-content\/uploads\/2023\/04\/image12-150x26.png 150w, https:\/\/ripenapps.com\/blog\/wp-content\/uploads\/2023\/04\/image12.png 341w\" sizes=\"(max-width: 392px) 100vw, 392px\" \/><\/p>\n<p><strong>Step 3<\/strong><\/p>\n<p>Add Angular Material Design UI Library to your app by using ng add @angular\/material<\/p>\n<p><img loading=\"lazy\" class=\"wp-image-4142 size-full\" src=\"https:\/\/ripenapps.com\/blog\/wp-content\/uploads\/2023\/04\/image10.png\" alt=\"Step 3 Add Angular Material Design\" width=\"793\" height=\"504\" srcset=\"https:\/\/ripenapps.com\/blog\/wp-content\/uploads\/2023\/04\/image10.png 793w, https:\/\/ripenapps.com\/blog\/wp-content\/uploads\/2023\/04\/image10-300x191.png 300w, https:\/\/ripenapps.com\/blog\/wp-content\/uploads\/2023\/04\/image10-768x488.png 768w, https:\/\/ripenapps.com\/blog\/wp-content\/uploads\/2023\/04\/image10-150x95.png 150w\" sizes=\"(max-width: 793px) 100vw, 793px\" \/><\/p>\n<p><strong>Step 4<\/strong><\/p>\n<p>Add material theme in the file style.css found in the src folder of your app. When you open the file, add this code: @import &#8220;~@angular\/material\/prebuilt-themes\/indigo-pink.css&#8221;;<\/p>\n<p><strong>Step 5<\/strong><\/p>\n<p>Build &amp; Consume rest API using HttpClient by adding HttpClientModule under the imports to the app.module.ts file.<\/p>\n<p><strong>Step 4<\/strong><\/p>\n<p>Generating a service rest to the app.<\/p>\n<p><img loading=\"lazy\" class=\" wp-image-4143 aligncenter\" src=\"https:\/\/ripenapps.com\/blog\/wp-content\/uploads\/2023\/04\/image11-300x39.png\" alt=\"Step 4 Generating a service rest to the app.\" width=\"484\" height=\"63\" srcset=\"https:\/\/ripenapps.com\/blog\/wp-content\/uploads\/2023\/04\/image11-300x39.png 300w, https:\/\/ripenapps.com\/blog\/wp-content\/uploads\/2023\/04\/image11-150x20.png 150w, https:\/\/ripenapps.com\/blog\/wp-content\/uploads\/2023\/04\/image11.png 519w\" sizes=\"(max-width: 484px) 100vw, 484px\" \/><\/p>\n<p><strong>Step 5<\/strong><\/p>\n<p>Open the rest-api.services.ts file in the app folder of your application\u00a0 and replace the code with the following:<\/p>\n<pre>import { Injectable } from '@angular\/core';\r\n\r\nimport { Observable } from 'rxjs';\r\n\r\nimport { HttpClient } from '@angular\/common\/http';\r\n\r\nexport interface User {\r\n\r\n\u00a0\u00a0id: string;\r\n\r\n\u00a0\u00a0name: string;\r\n\r\n\u00a0\u00a0email: string;\r\n\r\n\u00a0\u00a0website: string;\r\n\r\n}\r\n\r\n@Injectable({\r\n\r\n\u00a0\u00a0providedIn: 'root'\r\n\r\n})\r\n\r\nexport class RestApiService {\r\n\r\n\u00a0\u00a0api: string = \"https:\/\/jsonplaceholder.typicode.com\/users\";\r\n\r\n\u00a0\u00a0constructor(private http: HttpClient) { }\r\n\r\n\u00a0\u00a0getUsers(): Observable&lt;User[]&gt; {\r\n\r\n\u00a0\u00a0\u00a0\u00a0return this.http.get&lt;User[]&gt;(this.api)\r\n\r\n\u00a0\u00a0}\r\n\r\n}\r\n\r\n\r\n<\/pre>\n<p><b>Step 6<\/b><\/p>\n<p>Now add the following code in the app.component file in the src\/app\/ folder of your Angular app.<\/p>\n<pre>import { Component, ViewChild } from '@angular\/core';\r\n\r\nimport { RestApiService } from '.\/rest-api.service';\r\n\r\nimport { MatPaginator } from '@angular\/material\/paginator';\r\n\r\nimport { MatTableDataSource } from '@angular\/material\/table';\r\n\r\nexport interface TableElement {\r\n\r\n\u00a0\u00a0id: string;\r\n\r\n\u00a0\u00a0name: string;\r\n\r\n\u00a0\u00a0email: string;\r\n\r\n\u00a0\u00a0website: string;\r\n\r\n}\r\n\r\n@Component({\r\n\r\n\u00a0\u00a0selector: 'app-root',\r\n\r\n\u00a0\u00a0templateUrl: '.\/app.component.html',\r\n\r\n\u00a0\u00a0styleUrls: ['.\/app.component.scss'],\r\n\r\n})\r\n\r\nexport class AppComponent {\r\n\r\n\u00a0\u00a0Data!: TableElement[];\r\n\r\n\u00a0\u00a0col: string[] = ['id', 'name', 'email', 'website'];\r\n\r\n\u00a0\u00a0dataSource = new MatTableDataSource&lt;TableElement&gt;(this.Data);\r\n\r\n\u00a0\u00a0@ViewChild(MatPaginator, { static: true }) paginator!: MatPaginator;\r\n\r\n\u00a0\u00a0constructor(private restApiService: RestApiService) {\r\n\r\n\u00a0\u00a0\u00a0\u00a0this.restApiService.getUsers().subscribe((res) =&gt; {\r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0this.dataSource = new MatTableDataSource&lt;TableElement&gt;(res);\r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0setTimeout(() =&gt; {\r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0this.dataSource.paginator = this.paginator;\r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0}, 0);\r\n\r\n\u00a0\u00a0\u00a0\u00a0});\r\n\r\n\u00a0\u00a0}\r\n\r\n}\r\n\r\n\r\n<\/pre>\n<p><strong>Step 7<\/strong><\/p>\n<p>It\u2019s time to add the layout to the html file of Angular app. Add the following code to the app.component.html file.<\/p>\n<pre>&lt;mat-toolbar colour=\"accent\" class=\"header\"&gt;\r\n\r\n\u00a0\u00a0&lt;span&gt;Angular PWA Example&lt;\/span&gt;\r\n\r\n&lt;\/mat-toolbar&gt;\r\n\r\n&lt;table mat-table [dataSource]=\"dataSource\" matSort&gt;\r\n\r\n\u00a0\u00a0&lt;ng-container matColumnDef=\"id\"&gt;\r\n\r\n\u00a0\u00a0\u00a0\u00a0&lt;th mat-header-cell *matHeaderCellDef mat-sort-header&gt; ID. &lt;\/th&gt;\r\n\r\n\u00a0\u00a0\u00a0\u00a0&lt;td mat-cell *matCellDef=\"let element\"&gt; {{element.id}} &lt;\/td&gt;\r\n\r\n\u00a0\u00a0&lt;\/ng-container&gt;\r\n\r\n\u00a0\u00a0&lt;ng-container matColumnDef=\"name\"&gt;\r\n\r\n\u00a0\u00a0\u00a0\u00a0&lt;th mat-header-cell *matHeaderCellDef mat-sort-header&gt; Name &lt;\/th&gt;\r\n\r\n\u00a0\u00a0\u00a0\u00a0&lt;td mat-cell *matCellDef=\"let element\"&gt; {{element.name}} &lt;\/td&gt;\r\n\r\n\u00a0\u00a0&lt;\/ng-container&gt;\r\n\r\n\u00a0\u00a0&lt;ng-container matColumnDef=\"email\"&gt;\r\n\r\n\u00a0\u00a0\u00a0\u00a0&lt;th mat-header-cell *matHeaderCellDef mat-sort-header&gt; Email &lt;\/th&gt;\r\n\r\n\u00a0\u00a0\u00a0\u00a0&lt;td mat-cell *matCellDef=\"let element\"&gt; {{element.email}} &lt;\/td&gt;\r\n\r\n\u00a0\u00a0&lt;\/ng-container&gt;\r\n\r\n\u00a0\u00a0&lt;ng-container matColumnDef=\"website\"&gt;\r\n\r\n\u00a0\u00a0\u00a0\u00a0&lt;th mat-header-cell *matHeaderCellDef mat-sort-header&gt; Website &lt;\/th&gt;\r\n\r\n\u00a0\u00a0\u00a0\u00a0&lt;td mat-cell *matCellDef=\"let element\"&gt; {{element.website}} &lt;\/td&gt;\r\n\r\n\u00a0\u00a0&lt;\/ng-container&gt;\r\n\r\n\u00a0\u00a0&lt;tr mat-header-row *matHeaderRowDef=\"col\"&gt;&lt;\/tr&gt;\r\n\r\n\u00a0\u00a0&lt;tr mat-row *matRowDef=\"let row; columns: col;\"&gt;&lt;\/tr&gt;\r\n\r\n&lt;\/table&gt;\r\n\r\n&lt;mat-paginator [pageSizeOptions]=\"[7, 14, 28]\" showFirstLastButtons&gt;&lt;\/mat-paginator&gt;\r\n\r\n\r\n<\/pre>\n<p><b>Step 8\u00a0<\/b><\/p>\n<p>Now that we have created our angular app, it is time to convert the app to progressive web app (PWA). Use the command, ng add angular pwa. Also use the below commands:<\/p>\n<ul>\n<li aria-level=\"1\"><strong>npm i @angular\/service-worker &#8211;force<\/strong> to add angular service-worker module<\/li>\n<li aria-level=\"1\"><strong>npm install -g http-server<\/strong> to configure production build with http server<\/li>\n<li aria-level=\"1\"><strong>ng build &#8211;prod<\/strong> to build app for production<\/li>\n<li aria-level=\"1\"><strong>http-server -o<\/strong> to start the build<\/li>\n<\/ul>\n<p><strong>Step 9<\/strong><\/p>\n<p>Here is our app.<\/p>\n<p><img loading=\"lazy\" class=\"aligncenter wp-image-4148 size-full\" src=\"https:\/\/ripenapps.com\/blog\/wp-content\/uploads\/2023\/04\/Group-73.jpg\" alt=\"Step 9 Here is our app. Angular pwa Example\" width=\"1028\" height=\"767\" srcset=\"https:\/\/ripenapps.com\/blog\/wp-content\/uploads\/2023\/04\/Group-73.jpg 1028w, https:\/\/ripenapps.com\/blog\/wp-content\/uploads\/2023\/04\/Group-73-300x224.jpg 300w, https:\/\/ripenapps.com\/blog\/wp-content\/uploads\/2023\/04\/Group-73-1024x764.jpg 1024w, https:\/\/ripenapps.com\/blog\/wp-content\/uploads\/2023\/04\/Group-73-768x573.jpg 768w, https:\/\/ripenapps.com\/blog\/wp-content\/uploads\/2023\/04\/Group-73-150x112.jpg 150w\" sizes=\"(max-width: 1028px) 100vw, 1028px\" \/><\/p>\n<h2><span class=\"ez-toc-section\" id=\"Conclusion\"><\/span>Conclusion<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Build PWA with AngularJS wins a pool of advantages. PWAs are the future, and entrepreneurs shall opt for PWA with Angular in order to achieve the reliability and security they want in their apps. However, if you want to build heavy applications like gaming apps, PWAs won\u2019t be a good fit. Whereas for all their industries, PWAs using Angular can be a sustainable and promising development approach.<\/p>\n<p><a href=\"https:\/\/ripenapps.com\/contact-us\"><img loading=\"lazy\" class=\"aligncenter wp-image-4151 size-full\" src=\"https:\/\/ripenapps.com\/blog\/wp-content\/uploads\/2023\/04\/CTABanner.jpg\" alt=\"CTA Banner for Angularjs\" width=\"800\" height=\"225\" srcset=\"https:\/\/ripenapps.com\/blog\/wp-content\/uploads\/2023\/04\/CTABanner.jpg 800w, https:\/\/ripenapps.com\/blog\/wp-content\/uploads\/2023\/04\/CTABanner-300x84.jpg 300w, https:\/\/ripenapps.com\/blog\/wp-content\/uploads\/2023\/04\/CTABanner-768x216.jpg 768w, https:\/\/ripenapps.com\/blog\/wp-content\/uploads\/2023\/04\/CTABanner-150x42.jpg 150w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Platform-specific apps have been in the ecosystem for a long time. But, in recent times, build PWA with AngularJS web apps are\u00a0 grabbing momentum. It is due to the principle &hellip; <\/p>\n","protected":false},"author":1,"featured_media":4153,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[242],"tags":[1113,248,708,246,1112],"_links":{"self":[{"href":"https:\/\/ripenapps.com\/blog\/wp-json\/wp\/v2\/posts\/4131"}],"collection":[{"href":"https:\/\/ripenapps.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ripenapps.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ripenapps.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ripenapps.com\/blog\/wp-json\/wp\/v2\/comments?post=4131"}],"version-history":[{"count":16,"href":"https:\/\/ripenapps.com\/blog\/wp-json\/wp\/v2\/posts\/4131\/revisions"}],"predecessor-version":[{"id":11584,"href":"https:\/\/ripenapps.com\/blog\/wp-json\/wp\/v2\/posts\/4131\/revisions\/11584"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ripenapps.com\/blog\/wp-json\/wp\/v2\/media\/4153"}],"wp:attachment":[{"href":"https:\/\/ripenapps.com\/blog\/wp-json\/wp\/v2\/media?parent=4131"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ripenapps.com\/blog\/wp-json\/wp\/v2\/categories?post=4131"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ripenapps.com\/blog\/wp-json\/wp\/v2\/tags?post=4131"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}