How to Set Up a Develeopment Environment for Angular Web Apps
Zenva
ACCESS the FULL COURSE here: https://academy.zenva.com/product/full-stack-web-development-mini-degree/?zva_src=youtube-fullstackmd
TRANSCRIPT
All right, so let's go ahead and get started. First of all we're gonna need Node.js so we can use Node Package Manager. So go over to nodejs.org, and you'll see a button here. It'll say LTS for long-term support. You'll also see this one that says current. Do not get the current one 'cause that may have some bugs. This one is been around a little while, it's more baked. So go ahead and click this, and this'll go ahead and download Node.js, go through the prompt and get it installed. That should work for Windows, Linux, Mac. It'll have the appropriate download for you. So once you have that then you should have npm. So we can go over here.
So the next thing we need is we need to install Angular CLI. So what Angular CLI is gonna allow us to do is to quickly bootstrap a product. It'll scaffold everything for us so we don't have to mess around with the build scripts or anything like that, and it'll allow us to generate components, services, classes, and interfaces really easily. So you'll see that as we go through the tutorial. So let's go over to our terminal, and if you're on Windows it should be the command prompt, and so if you're on a Mac like I am you should be able to type which npm, and it'll tell you where it's located. Type npm --version and type node --version and 8.4. Perfect. So you should see something like that. There might be a different command on Windows to figure out which version you have there, but you could be able on Windows to run npm --version, node --version to get your versions. So from here, if we go back over to the instructions, we can see it says npm install -g @angular/cli. So let's go ahead and run that. Make sure you put the at sign /cli. So what that's gonna do it it's gonna install this package globally, -g for global, the Angular CLI. So we'll be able to run Angular CLI commands. So we'll let that go ahead and install. This might take a few minutes here to a few seconds based on how fast your internet connection is. Perfect, so in 16 second downloaded Angular CLI, 1.7.4 is the version we're using.
So we can now run the next commands, ng new my-dream-app. So we'll call it ng. We'll say new, we wanna create a new Angular project, and let's call it recipe. Yeah, we'll just call it recipe. So hit enter, and you'll see it go ahead, and it'll start scaffolding your project here. This might take a couple seconds to run. It's building out your entire project along with tests, everything else. We're not gonna really get into testing this project. So you can karma, e2e for end to end testing. We're not gonna really focus on that in this tutorial, but it's nice to know you have every ... https://www.youtube.com/watch?v=ju43c2UB_2s
25948860 Bytes