Set up
Learn how to set up your local environment to develop Angular apps and also how to run this angular project.
Before you begin, make sure your development environment includes
Node.js®
and an npm package manager.Angular requires
Node.js
version 10.9.0 or later.- To check your version, run
node -v
in a terminal/console window.
Angular, the Angular CLI, and Angular apps depend on features and functionality provided by libraries that are available as npm packages. To download and install npm packages, you must have an npm package manager.
This setup guide uses the npm client command line interface, which is installed with
Node.js
by default.To check that you have the npm client installed, run
npm -v
in a terminal/console window.Although it's not required, the version control system Git is highly recommended. First, install the command-line utility from the download page. For a GUI client, we recommend Github Desktop.
To verify the installation, open a new terminal window and run:
$ git --version
You use the Angular CLI to create projects, generate application and library code, and perform a variety of ongoing development tasks such as testing, bundling, and deployment.
To install the CLI using
npm
, open a terminal/console window and enter the following command:npm install -g @angular/cli
After you have installed the Angular CLI, you have to install all the dependencies required by the project. Each angular project has its own dependencies which are listed on his
package.json
file. - Download a copy of the template you just bought. You can do it from the "Thanks for your purchase" email or from your account at AngularTemplates.
- Unzip the downloaded files.
- Move the files to the location of your preference.
- Open your console or terminal and navigate to this location.
$ cd your-app
- Install the project dependencies by running the following command from the console or terminal:
$ npm install
Now you have everything installed, you are ready to start building and modifying this angular starter template to create your own and unique app.
This project was generated with the Angular CLI so to build, and serve it on a development server, we will go to the parent directory of your workspace use the following commands:
$ cd your-app
$ ng serve
When you use the ng serve command to build an app and serve it locally, the server automatically rebuilds the app and reloads the page each time you change any of the source files.
Last modified 3yr ago