How to Install angular 4 on Ubuntu and getting started with Angular 4 github / Cli
Now, Here we go today In this Quick Tutorial I am gonna so you that how you can install angular 4 on your Ubuntu Operating system. So be tuned and read the whole article carefully.
Generally in these ways you can Install angular and angular 4 app on Ubuntu.
— You can clone Angular 4 project from Github (angular 4 Github / angular 2 Github)
— You can use the Angular-CLI for Installation. which is often called angular 4 cli
#1. Install Angular 4 on ubuntu with Angular cli.
Firstly you need to make sure that you have already installed few of dependencies on y.
our Ubuntu system to Install angular 4.
These two things are major.
— Angular-CLI (Command Line Interface)
— Node.js with NPM
If you want to check this it’s installed in your system or not. So need not to worry at all just hit a single command from your terminal.
$ node -v
After this command you can see the version of currently installed nodejs.
If you are unable to see then simply you need to install nodejs into your system.
For ubuntu follow these steps & run these commands from terminal.
$ sudo apt-get update
$sudo apt-get install nodejs
Now you’ll also want to also install npm
sudo apt-get install npm
If you want to Install Using a PPA you need to install the PPA to get access to its contents.
For the Currrent active Ubuntu release.
curl -sL https://deb.nodesource.com/setup_7.x | sudo -E bash -
The PPA will be added to your configuration and your local package cache will be updated automatically.
$ sudo apt-get install nodejs
After that you will need to install the build-essentials package:
sudo apt-get install build-essential
That’s it you have successfull install nodejs.
Now install angular 4 using CLI
Open your terminal and write the command for install angualr cli
$ install @angular/cli
$ sudo npm install -g @angular/cli
Once that’s finished hit the command to show the Command line for angular cli
Just type the following command.
If suppose ng is not installed in your system please install it by follwong command.
$ sudo apt install ng-common
Now, The CLI will install an Angular 4 project by default.
To start a new ng4 project, on the your terminal, type:
$ ng new my-project-name
// install here
$ cd my-project-name
#2. Install Angular 4 app Project with Github without the Angular cli
If you want to install Angular 4 without the command line tool, you can install it manually like from angular 2 quickstart and angular 2 Github clone.
There is no official release for Angular 4 Github repo right now ( at the time of writing )so you can see there is not an Angular 4 Quickstart repository. so you can install angular 2 once in your system then you can upgrade it from the command line.
To use the Angular 2 Quickstart, you run:
git clone https://github.com/angular/quickstart.git quickstart
Make sure git, npm, nodejs is already installed in your System.
— After that hit the commands.
$ cd quickstart
$ npm install
For Upgrade an Angular 2 Quickstart you can run the following command.
npm install @angular/common@next @angular/compiler@next @angular/compiler-cli@next @angular/core@next @angular/forms@next @angular/http@next @angular/platform-browser@next @angular/platform-browser-dynamic@next @angular/platform-server@next @angular/router@next @angular/animations@next --save
After the Upgrading Process you need to Install typescript on your system. (Typescript 2.1.6 or higher Version for Angular 4)
Just hit the following commands.
npm install firstname.lastname@example.org --save
Once everything is ready,
Now hit the command for start your angular 4 project.
That’s it Congratulations you did that – you completed Installation & Configuration of Angular 4 app.
If you have any questions in your beautiful mind please feel free to ask and Subscribe & Share.