run angularJS project

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.

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.