In this lesson I will show you how to install angular and run your first project of angular, we will discuss about node.js, npm, angular cli, and many more. environment, installation, creating first app and run on browser.
watch video from blueterminal:
in this lesson I will show how to install angular, and how to run angular app.
for installation of angular first we need to download and install node.js
node package manager(npm) is registry of packages or npm is a tools that have many more libraries. we download angular from npm in a bit. for more information about npm click what's npm?.
after downloading and installing node.js its install automatically npm. now check the version of node js simply open cmd or terminal and the command.
hit enter its show result like in image.
in my case its v14.17.0 if you install other version it can be different from this.
next check the npm version enter the command in terminal
ouput like this.
now we ready to download angular just enter command in terminal
npm i -g @angular/cli
its start to download angular like in image.
its take some time to download libraries of angular. when its complete its show success message than you can check angular version with this command.
its show all about angular like in image.
command line interface(cli) is a tool that can initialize your app, develop your app, its can maintain your app from command line.
now we can create our first angular app. simple enter the command
ng new Hello-world
Hello-world is your project name its take some time to generate your app after successfully creating its show successful message in terminal.
Run your app.
after creating app now lets run your app. navigate your app folder in terminal run this command.
hit enter first time its take some time for compiling app source files. after compiling its give you a URL like http://localhost:4200 open this URL in your browser that's your first app by default here something from angular you can erase everything in app.component.html and start your own project further.