How To Set Up An Angular Web App Development Environment
- This guide is applicable to Angular 2 onwards.
- You should set up Angular on a development machine but not on the hosting server.
You must set up the following first:
- Node.js and npm. See How To Install NodeJs And Npm On Linux.
Let's call the app angular-app and set it up under the home directory.
- Go to the home directory.
- Create the angular-app project repository from the Angular quickstart repository.
git clone https://github.com/angular/quickstart.git angular-app
- Go to the angular-app project directory.
- Install npm packages.
- Launch the app.
A browser window will be launched showing the quickstart content from http://localhost:3000.
Note: If you run "npm start" on a virtual development environment such as vagrant, you will need to configure port forwarding on your local machine, then you can go to the app page on the forwarding port on your local machine. E.g. http://localhost:30000.
- Modify the code in the Angular app directory and see the changes on your browser.