Setting up your development environment

In order to get started with Angular, you're going to need to have the Angular CLI installed; to install that, you first need to have Node.js and npm (node package manager) installed. If you've already got Node.js and npm installed, great! If not, don't worry—they are easy to install and I will take you through the installation process in Appendix A, Toolchain for Web Development with Angular, near the back of the book. In Appendix A, I also take you through installing the Angular CLI and how to use it for building Angular applications. For brevity, I'll refer to the Angular CLI tool as just the CLI from this point forward.

If you are unsure whether you have NodeJS and npm installed, you can check really quickly by typing $ node -v and $ npm -v, respectively, on your command line. Similarly, you can type $ ng -v on the command line to see whether you have CLI installed. If you get a version number back, you have that particular tool installed (as shown in the following screenshot I took).

Note: Do not type $ at the beginning of the commands. The $ signifies the command prompt, entry point for the commands you'll type. Unix-based operating systems, such as macOS and Linux systems, commonly use $ or % as their command prompt—depending on the shell being used, or if there are any custom settings specified in a configuration file on your system. Windows operating systems typically use the greater than sign, >, as their command prompt.

If any of these commands go unrecognized, jump on over to Appendix A real quick, install the tools, and jump right back here. I'll be waiting for you.

We'll also need a code editor. There are many code editors available today, including a number of free ones. Though any code editor will suffice, I would suggest you use Visual Studio Code for your Angular development—at least while working through this book. The reason for this is that Visual Studio Code is free, it's cross-platform, and is an excellent code editor. It's also the code editor that I've used while writing this book and so when I suggest the use of an extension, you can easily install the same one.

The preceding is all you need for this first chapter. When we start building the example project, which requires us to have a local database, you'll also need to install MongoDB. MongoDB, also known as Mongo, is a great NoSQL database that is also free and cross-platform. I take you through Mongo's installation process in Appendix B, MongoDB.

Additionally, there will be other software that you'll need to install, such as Chrome extensions, and I will let you know what they are and where to find them at the appropriate time. For now, let's get started with writing some Angular code.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.141.31.240