Book Image

Angular Projects

By : Zama Khan Mohammed
Book Image

Angular Projects

By: Zama Khan Mohammed

Overview of this book

<p>Angular is one of the best frameworks, not only for building web applications, but also for building applications on other platforms such as desktop and mobile. It is packed with amazing web tools that allow developers to become more productive and make the development experience a happier one </p><p>This book will be your practical guide when it comes to building optimized web apps using Angular. The book explores a number of popular features, including the experimental Ivy rendered, lazy loading, and differential loading, among others, in the projects. It starts with the basics of Angular and its tools, which will help you to develop and debug Angular applications. You will learn how to create an SPA using Angular Router, and optimize it by code splitting and Preloading Routes. We will then build a form-heavy application and make forms reactive by using Reactive Forms. After that, we will learn how to build a Progressive Web App, and a server-side rendering app, as well as a MonoRepo app. Furthermore, we will also dive into building mobile apps using Ionic and NativeScript. Finally, we end the book by creating a component library for our application using Angular CDK and then testing it. </p><p>By the end of this book, you’ll have gained comprehensive insights into using Angular, along with hands-on experience in creating intuitive real-world applications.</p>
Table of Contents (19 chapters)
Title Page
Copyright and Credits
Dedication
Foreword

Introducing Angular Console

The Angular Console is a graphical user interface (GUI) tool for the Angular CLI that was built by the Narwhal Technologies (Nrwl) team. It makes it easier for a beginner who is not familiar with all the Angular CLI commands and with the different options available for each command to use the Angular CLI effectively and learn about different commands along the way. Now, let's learn how to download Angular Console and configure it:

  1. Download Angular Console from https://angularconsole.com and complete the step-by-step installation.
  2. When you open Angular Console, you will be given the option to either add a new project or use a current Angular CLI application. Let's go ahead and create a new application:

First, select the parent directory where the project will reside and then name the workspace for the project before selecting a schematic. Angular CLI uses schematics to provide you with different commands and functions that you can use for an application. Here, we are given the choice of using @schematics/angular, which is a default schematic that comes with Angular CLI, and @nrwl/schematics, which is an enterprise-ready monorepo schematic that was built by the Nrwl.io team:

Once the project has been created, you are taken to the Projects page. On this screen, you will see all the applications in the project. In the preceding screen, we can see one project: one is the main app. Additional applications can be configured using the angular.json file in the project.

We also have the Run button, and when you click it, it opens up a dropdown with Build, Serve, Test, Lint and E2e end-to-end test command. Once you click on Serve on the Projects page, you will be taken to the commands detail page. Here, you can add/change different fields, which are categorized into two buckets: Important and Optional. You can see this in the following screenshot:

You can change the fields and click on the Run button at the top to serve the application:

Once the build is complete, just click on the Open App link in the task output to open the application in the browser. 

You can close this command execution window by using the close icon in the top left and continue to use other features of Angular CLI using this GUI tool. Angular Console also allows you to add additional Angular CLI extensions. You can navigate to this option using the left menu on the Projects page.

Angular Console is a great tool for those who are beginners to Angular CLI as well as those who cannot keep up with all the commands and their options. Now that we have Angular Console installed, let's install the editor we will be using in this book, VS Code, and configure it for working with Angular projects.