{"id":23,"date":"2020-05-11T12:29:14","date_gmt":"2020-05-11T06:59:14","guid":{"rendered":"https:\/\/www.onlinenote.in\/angularjs\/?p=23"},"modified":"2020-05-11T12:29:14","modified_gmt":"2020-05-11T06:59:14","slug":"how-to-install-angular-on-ubuntu-18-04-16-04","status":"publish","type":"post","link":"https:\/\/www.onlinenote.in\/angular\/how-to-install-angular-on-ubuntu-18-04-16-04\/","title":{"rendered":"How to Install Angular on Ubuntu (18.04 &#038; 16.04)"},"content":{"rendered":"<p><strong>Angular<\/strong> is a TypeScript-based, open-source web application framework led by the Angular Team at Google. Angular is a complete rewrite from the team that built AngularJS.<\/p>\n<h3>Pre-requisites<\/h3>\n<p>First of all, you need to install node.js on your system. If you don\u2019t have node.js installed use the following set of commands to add node.js PPA in your Ubuntu system and install it.<\/p>\n<h5 class=\"heading1\">Step 1 \u2013 Install Node.js<\/h5>\n<p>In the below commands node 12 version will be installed to know more about other versions refer <a href=\"https:\/\/www.onlinenote.in\/angularjs\/install-node-js-in-ubuntu\/\">link<\/a><\/p>\n<pre class=\"lang:default decode:true\">sudo apt install python-software-properties\r\ncurl -sL https:\/\/deb.nodesource.com\/setup_12.x | sudo -E bash -\r\nsudo apt install nodejs<\/pre>\n<h5 class=\"heading1\">Step 2 \u2013 Install Angular\/CLI<\/h5>\n<p>After installation of node.js and npm on your system, use following commands to install Angular cli tool on your system.<\/p>\n<pre class=\"lang:default decode:true \">npm install -g @angular\/cli<\/pre>\n<p>The <code>-g<\/code> flag will install the Angular CLI tool globally so that it will be accessible to all users and applications on the system.<\/p>\n<p>The latest version of Angular CLI will be installed on your Ubuntu Linux system. You may require older Angular version on your machine. To install specific <a href=\"https:\/\/en.wikipedia.org\/wiki\/Angular_(web_framework)\" target=\"_blank\" rel=\"noopener noreferrer\">Angular version<\/a> run command as following with version number.<\/p>\n<pre class=\"lang:default decode:true \">npm install -g @angular\/cli@6     #Angular 6\r\nnpm install -g @angular\/cli@7     #Angular 7<\/pre>\n<h5 class=\"heading1\">Step 3 \u2013 Check Angular\/CLI version<\/h5>\n<p>To verify the installation, check the version of Angular installed in your system using the <code>ng<\/code> command in Angular CLI:<\/p>\n<pre class=\"lang:default decode:true \">ng --version<\/pre>\n<h5 class=\"heading1\">Step 4 \u2013 Create a New Angular Application<\/h5>\n<p>Now, create a new application named hello-angular4 using the Angular CLI tools. Execute the commands to do this:<\/p>\n<pre class=\"lang:default decode:true \">ng new hello-angular<\/pre>\n<h5 class=\"heading1\">Step 5 \u2013 Serve Angular Application<\/h5>\n<pre class=\"lang:default decode:true \">cd hello-angular\r\nng serve<\/pre>\n<p>After compilation you can access your angular application on localhost port 4200, Which is the default host and port used by Angular application.<\/p>\n<p>http:\/\/localhost:4200<\/p>\n<p>You can change host and port for running Angular application by providing \u2013host and \u2013port command line arguments.<\/p>\n<pre class=\"lang:default decode:true \">ng serve --host 0.0.0.0 --port 8080<\/pre>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Angular is a TypeScript-based, open-source web application framework led by the Angular Team at Google. Angular is a complete rewrite from the team that built AngularJS. Pre-requisites First of all, you need to install node.js on your system. If you don\u2019t have node.js installed use the following set of commands to add node.js PPA in [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v19.10 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to Install Angular on Ubuntu (18.04 &amp; 16.04) - Angular<\/title>\n<meta name=\"description\" content=\"How to Install Angular on Ubuntu (18.04 &amp; 16.04). Angular is a TypeScript-based, open-source web application framework led by the Angular Team at Google\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.onlinenote.in\/angular\/how-to-install-angular-on-ubuntu-18-04-16-04\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Install Angular on Ubuntu (18.04 &amp; 16.04) - Angular\" \/>\n<meta property=\"og:description\" content=\"How to Install Angular on Ubuntu (18.04 &amp; 16.04). Angular is a TypeScript-based, open-source web application framework led by the Angular Team at Google\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.onlinenote.in\/angular\/how-to-install-angular-on-ubuntu-18-04-16-04\/\" \/>\n<meta property=\"og:site_name\" content=\"Angular\" \/>\n<meta property=\"article:published_time\" content=\"2020-05-11T06:59:14+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.onlinenote.in\/angular\/how-to-install-angular-on-ubuntu-18-04-16-04\/\",\"url\":\"https:\/\/www.onlinenote.in\/angular\/how-to-install-angular-on-ubuntu-18-04-16-04\/\",\"name\":\"How to Install Angular on Ubuntu (18.04 & 16.04) - Angular\",\"isPartOf\":{\"@id\":\"https:\/\/www.onlinenote.in\/angular\/#website\"},\"datePublished\":\"2020-05-11T06:59:14+00:00\",\"dateModified\":\"2020-05-11T06:59:14+00:00\",\"author\":{\"@id\":\"\"},\"description\":\"How to Install Angular on Ubuntu (18.04 & 16.04). Angular is a TypeScript-based, open-source web application framework led by the Angular Team at Google\",\"breadcrumb\":{\"@id\":\"https:\/\/www.onlinenote.in\/angular\/how-to-install-angular-on-ubuntu-18-04-16-04\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.onlinenote.in\/angular\/how-to-install-angular-on-ubuntu-18-04-16-04\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.onlinenote.in\/angular\/how-to-install-angular-on-ubuntu-18-04-16-04\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.onlinenote.in\/angular\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Install Angular on Ubuntu (18.04 &#038; 16.04)\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.onlinenote.in\/angular\/#website\",\"url\":\"https:\/\/www.onlinenote.in\/angular\/\",\"name\":\"Angular\",\"description\":\"Code Snippets\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.onlinenote.in\/angular\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Install Angular on Ubuntu (18.04 & 16.04) - Angular","description":"How to Install Angular on Ubuntu (18.04 & 16.04). Angular is a TypeScript-based, open-source web application framework led by the Angular Team at Google","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.onlinenote.in\/angular\/how-to-install-angular-on-ubuntu-18-04-16-04\/","og_locale":"en_US","og_type":"article","og_title":"How to Install Angular on Ubuntu (18.04 & 16.04) - Angular","og_description":"How to Install Angular on Ubuntu (18.04 & 16.04). Angular is a TypeScript-based, open-source web application framework led by the Angular Team at Google","og_url":"https:\/\/www.onlinenote.in\/angular\/how-to-install-angular-on-ubuntu-18-04-16-04\/","og_site_name":"Angular","article_published_time":"2020-05-11T06:59:14+00:00","twitter_card":"summary_large_image","twitter_misc":{"Written by":"","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.onlinenote.in\/angular\/how-to-install-angular-on-ubuntu-18-04-16-04\/","url":"https:\/\/www.onlinenote.in\/angular\/how-to-install-angular-on-ubuntu-18-04-16-04\/","name":"How to Install Angular on Ubuntu (18.04 & 16.04) - Angular","isPartOf":{"@id":"https:\/\/www.onlinenote.in\/angular\/#website"},"datePublished":"2020-05-11T06:59:14+00:00","dateModified":"2020-05-11T06:59:14+00:00","author":{"@id":""},"description":"How to Install Angular on Ubuntu (18.04 & 16.04). Angular is a TypeScript-based, open-source web application framework led by the Angular Team at Google","breadcrumb":{"@id":"https:\/\/www.onlinenote.in\/angular\/how-to-install-angular-on-ubuntu-18-04-16-04\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.onlinenote.in\/angular\/how-to-install-angular-on-ubuntu-18-04-16-04\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.onlinenote.in\/angular\/how-to-install-angular-on-ubuntu-18-04-16-04\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.onlinenote.in\/angular\/"},{"@type":"ListItem","position":2,"name":"How to Install Angular on Ubuntu (18.04 &#038; 16.04)"}]},{"@type":"WebSite","@id":"https:\/\/www.onlinenote.in\/angular\/#website","url":"https:\/\/www.onlinenote.in\/angular\/","name":"Angular","description":"Code Snippets","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.onlinenote.in\/angular\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":""}]}},"_links":{"self":[{"href":"https:\/\/www.onlinenote.in\/angular\/wp-json\/wp\/v2\/posts\/23"}],"collection":[{"href":"https:\/\/www.onlinenote.in\/angular\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.onlinenote.in\/angular\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.onlinenote.in\/angular\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.onlinenote.in\/angular\/wp-json\/wp\/v2\/comments?post=23"}],"version-history":[{"count":1,"href":"https:\/\/www.onlinenote.in\/angular\/wp-json\/wp\/v2\/posts\/23\/revisions"}],"predecessor-version":[{"id":25,"href":"https:\/\/www.onlinenote.in\/angular\/wp-json\/wp\/v2\/posts\/23\/revisions\/25"}],"wp:attachment":[{"href":"https:\/\/www.onlinenote.in\/angular\/wp-json\/wp\/v2\/media?parent=23"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.onlinenote.in\/angular\/wp-json\/wp\/v2\/categories?post=23"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.onlinenote.in\/angular\/wp-json\/wp\/v2\/tags?post=23"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}