Get your copy today!
A Packt Publication resource that will help you understand the Angular Development process and improve the quality of your work.
In this book, we will be covering different kinds of projects, from the basic Angular app to a server-rendered one, and a native app for Android and iOS. We will also look at how to create a component library for our enterprise applications and start testing our components. We will be using different Angular component libraries and tools and get a holistic view of Angular Framework and its capabilities.
Angular apps are written using web technologies. In order to run Angular apps, we need to install Node.js on our machine, which is what we will be doing in this first chapter.
Angular is a framework for building mobile and web applications. It uses TypeScript, which is a superscript of ECMAScript. It adds support for types in JavaScript, which makes the development of Angular apps easier at compile time. We will look into some basic concepts of TypeScript in this chapter, which will explain some of the syntax that we will be using in this book.
Another tool we will look at is Angular CLI, the command-line interface program that the Angular team has created to help with the development and maintenance of Angular apps.
We could write Angular apps using a simple text editor, but to get full productivity out of building our Angular application, we will be using VS Code. Instead of being an Integrated Development Environment (IDE), it's a code editor with rich extension support. In this chapter, we will use VS Code and install the required extensions to make Angular development faster.
The following topics will be covered in this chapter:
In this chapter, we will develop a basic Angular app for a flashcard game. We will also introduce some of the built-in attributes and structural directives in the Angular framework and create a basic template-driven form so that we can add/edit the flashcards. We will be introduced to observables and learn how to use the async pipe to get observable data on the page. We will also create a basic FlashService to perform all the operations related to adding, editing, and deleting flashcards.
The following topics will be covered in this chapter:
In this chapter, we will create a personal blog using Angular. We will create it as a singlepage application (SPA) using Angular Router. SPAs have the benefit of loading most of an application on their initial load, which is crucial when you are browsing a website. When going from one page to another, an SPA doesn't have to download the whole page; instead, it requests the required API for the page, which is way faster. You will also learn how to configure multiple environments for the project, optimize the SPA using lazy loading routes, and animate routes and elements in Angular applications.
The following topics will be covered in this chapter:
In this chapter, we will be creating an application for managing an inventory using one of the third-party component libraries that was created by VMware's team, known as the Clarity component. It follows the Clarity Design System, which has detailed UX/UI guidelines that need to be followed for using the components correctly. It also documents do's and don'ts for using each of the components. You can find the documentation at https:/ / clarity. design.
Throughout this chapter, we will be displaying products and performing Create, Read, Update, and Delete (CRUD) operations. In this project, we will also be using reactive forms and creating a complex form via a step-by-step workflow using Clarity's wizard component. We will be using some built-in validations from Angular and will also be creating a custom validator.
The following topics will be covered in this chapter:
In this chapter, we will be creating an e-commerce application for an electronic store, and then we will convert it into a Progressive Web App (PWA), add support for offline usage, and also add the web app as an application on the home screen on both Android and iOS. We will also set up a Nest.js application so that we can get data from MongoDB.
The following topics will be covered in this chapter:
In this chapter, we will be using the Firebase Realtime Database to create a Native application that runs on iOS and Android. This will use the Ionic 4 framework. We will also be using ngx-formly in order to create a dynamic form without having to write an HTML code for the whole form.
The following topics will be covered in this chapter:
In this chapter, we will continue to work on our personal blog from Chapter 3, Building a Personal Blog Using Angular Router and WordPress, where we created a Single-Page Application (SPA) using Angular Router. We will render the application on the server so that the performance and the search engine's optimization can be optimized. We will use TransferState to make sure that the APIs are cached when rendered in the server so that the APIs are not called redundantly on the client. We will use different forms of Search Engine Optimization (SEO) to make it discoverable on search engines and so that it can be shared properly on social media platforms such as Twitter, Facebook, and LinkedIn.
The following topics will be covered in this chapter:
In this chapter, we will be creating an enterprise application for admins so that they can log in and check the sales of the e-commerce application we've developed. We will be using OAuth, along with Auth0, to authenticate users of our application and check the sales of each product using D3 visualizations. We will be using the Nx workspace to create our monorepo application, which will include not only our e-commerce application and admin application, but also libraries that can be shared by them.
The following topics will be covered in this chapter:
In this chapter, we are going to develop a NativeScript application with the use of Angular to display news posts. We will allow the user to select from a range of different languages and display the news in the selected language. We will be mocking the API to fetch news posts in different languages. We will use two languages—English and Spanish—and use ngx-translate to add internationalization to our application. We will do this by using a NativeScript plugin for use as a Native Snackbar.
The following topics will be covered in this chapter:
In this chapter, we will build a component library that can be used not only in our applications but can also be published on npm so that it can be used by any other applications that want to use our component library. Reusable component libraries are something that make teams build awesome applications super fast. We will be building a drop-down reusable component library that will be so flexible that it can be used multiple times in the application.
The following topics will be covered in this chapter:
In this chapter, we will cover one of the important topics in software development, that is, testing applications, and why it is important. We will start with an existing application that was built using the Angular CLI and we will make sure that all the existing tests pass. Then, we will add a new isolated test case and some deep integration testing to our application. We will then move on to running a code coverage report and setting thresholds for our coverage report. Afterward, we will move on to updating our tests, using Jest as the test runner to make the testing experience delightful. We will end this chapter by adding some end-to-end (e2e) tests to test the application.
The following topics will be covered in this chapter:
What you can learn with this Angular Book
The book follows the best practices that are approved by Angular Team.
It showcases different tools that allow for the highest level of cooperation and the highest quality of work.
Tools used in the book!