Installing the Angular CLI2:56 with James Churchill
Now that we know what the Angular CLI is, let's install it on our system.
Before we can use the Angular CLI to create a new project, 0:00 we need to install it on our system. 0:03 Before we do that, we need to verify that we have Node and NPM installed and 0:06 what versions we're currently running. 0:10 The CLI and the Angular project that it will generate will have dependencies that 0:12 require Node 6.9.0 or higher, together with NPM 3 or higher. 0:17 Luckily, doing this is easy to do. 0:24 Let's open an instance of the terminal by pressing Cmd + space bar 0:27 to open Spotlight Search on Mac OS. 0:31 Then we can type the first part of the word terminal and press Enter. 0:35 If you're on Windows, you can press the Windows key or 0:41 click on the Start button and type command to search for the command prompt. 0:45 Then to verify that Node is installed, type at the prompt, the command, node- v. 0:50 If you have Node installed, you'll see what version you're running. 0:57 We can see here that I'm running version 9.3.0. 1:01 You can do the same for NPM by typing the command, npm-v. 1:05 If you don't have either Node or NPM installed or 1:11 you don't have current enough versions installed, go ahead an pause the video and 1:14 install or update your installations. 1:18 See the Teacher's Notes for links that can help guide you through the process. 1:22 Now let's install the Angular CLI by running 1:26 the command npm install -g @angular/cli. 1:31 The -g option tells the NPM package manager to install 1:37 the Angular CLI globally. 1:41 That'll make the CLI commands available from within any directory in our system. 1:44 Go ahead and press Enter to run the command. 1:50 Now that we've installed the CLI, we'll have the ng command available globally. 1:58 To verify this, we can run the command ng 2:03 which displays a list of the available commands and options. 2:07 I'll press Cmd +- a bit to reduce the size of my font. 2:10 That'll make it easier to review the list of commands. 2:15 As you can see, there are a fair number of commands and options available. 2:18 To see information about a specific command, we can run the command ng help, 2:29 followed by the CLI command we want to learn more about, say, the new command. 2:33 Or we can type ng new, 2:41 followed by--help to do exactly the same thing. 2:44 Now that we have the CLI installed, 2:49 we're ready to create our first app which is what we'll do next. 2:52
You need to sign up for Treehouse in order to download course files.Sign up