run angularJS project

Last Update November 10, 2020: We improved the overall article.

After complete learning AngularJS, 🙂

you need to know how to run the angularJS project on a server or in your localhost machine.

Hope you know AngularJS is a complete JavaScript-based open-source client-side web application framework.

So the project never runs in a default web server.

Here is a guide on how to run angularJS project on your localhost server and the webserver.

Advertisment

It’s a JavaScript framework offering declarative, two-way data binding for web

1. View to Model – changes made to the View are propagated to the Model

2. Model to View – the View responds to changes made to the Model

Run angularJS project on web server

If you are running node.js:

1. Run node scriptsweb-server.js to start the webserver

2. In your browser, navigate to http://localhost:8000/app/index.html

Running Xampp Webserver

In your browser, navigate to http://localhost:8000/app/index.html

Example angular-phonecat to run: http://localhost:8000/angular-phonecat/app/

Note:if you are seeing an error with xampp listening port 8000 then maybe your port is 8080 by default.

To change port in xampp do the flowing step:

1. Open the path C:xamppapacheconf  find  httpd.conf file and open it

Listen Port Listen 80  to change it Listen 8000

AngularJS

Save the file.

Then restart apache.

Running Others WebServer

If you are running some other http server:

1. Make sure the /angular-phonecat repository was cloned into your wamp/www folder.

2. Navigate in your browser to http://localhost:[port-number]/angular-phonecat/app .

Windows Command Line

 cd /d C:xampp
 C:xampp

On Git Bash window

  $ node scripts/web-server.js 
Http Server running at http://localhost:8000/
http://localhost:8000/angular-phonecat/app/

 

That’s It I hope you will find the solution here.

To share the article.

Advertisement
Previous articleCreating a new Android Project in Terminal-Android Studio – IDE
Next articleSetting up Nodejs HTTP server on Windows
Abdullah Al Mahamud has always been fascinated by the world and is a writer because he wants to share her love of travel with others. He has written for thedevline since 2016, specializing in modern real-life writing about fashion, arts & culture, technology tips, and more! When not writing articles for us at The dev line (which doesn't happen often!), he enjoys exploring both scenic beauty around the globe as well as intellectual topics that help other people become happier. like productivity hacks or ways to save on your grocery bill.