In order to create your AngularJS project, you need 2 steps. Firstly, we need to install NodeJS. Secondly, you need to read this guide. Nice to see you again! If you have faced the task of writing a website or web application, where everything or almost everything works without reloading the page, i.e., using AJAX requests, then it is quite possible that you should look towards JS frameworks, in particular, it can be AngularJS. In order to use such a framework, you first need to understand how it works and how to install it on your personal computer with the Windows operating system. In this article, I will tell you about everything in detail. Read on and put that in your pipe.
AngularJS can simplify your work with your web site or application, as well as provide additional opportunities for further work. What is meant? For example, you may face the fact that your code will eventually turn into a mess that will be difficult to maintain since the code is not split. AngularJS provides some structure that we can follow. This is the so-called MVC framework. This allows you to separate your application into logical parts. In this case, it is a model-view-controller. Angular positions itself as a framework for improving HTML. Indeed, it is trying to make HTML more dynamic, expanded, and user-friendly.
AngularJS in Windows
Now, after describing all the advantages and tasks of the AngularJS, let’s move on to installing it. First, you need to set up the AngularJS development environment. To do this, you need the following tools: AngularJS Library, Editor/IDE, Browser, Web server. You can download the AngularJS library on the official website by clicking the download button, which will open a popup where you have to select the required version and click again ‘download.’
In order to create your Angular project and before that, of course, install it.
There is the following way
Select the folder you want to download, for example, in the C folder. Then press the button ‘Next’ several times, then the ‘Install’ button and ‘Finish’ when the installation is over. Now check the Node installation. To check if NodeJS is appropriately installed on your PC, in your command prompt, write node-v. If it is not installed, it will show such a message ‘NodeJS is not recognized as an internal or external command.’ But when it is installed, it will give a number of NodeJS, which is installed. After that, we can download the Angular project.
- Before you download any Angular project you have to download Angular CLI. It’s simple. You just have to write in the command prompt ‘npm install – g @angular/cli’. It will take some time depending on your computer speed. Now it’s done and you can download your Angular project. First of all, you need to decide where you want to install your project. For example, I want to install it on my E Drive and I need to write ‘E’ then column. It will go to my E Drive. Now you have to write ‘ng new’ and the name of your project. Then it will ask you a question like ‘Would you like Angular routing?’ Click ‘Yes’. Select CSS. It will take some time to download. So after it’s completed you can go to the project file and in the location bar you can write ‘CMD’ and a command prompt will be open with that location.
- Then to open the project you can write a short cut of your editor project. For example ‘code ./’. It will open in visual code. To run the project you can write ‘ng serve –open’ and it will open in your default browser.
It is a pleasure for all developers to work with the Angular framework. You could read about the structure and advantages above. Also, I described in detail how to install and run AngularJS on the Windows operating system. I hope that after reading this article you understand how AngularJS works, its main characteristics and most importantly, you can easily install this framework.