{"id":367,"date":"2023-09-15T16:08:16","date_gmt":"2023-09-15T16:08:16","guid":{"rendered":"https:\/\/devopsopen.com\/?p=367"},"modified":"2023-09-22T20:26:47","modified_gmt":"2023-09-22T20:26:47","slug":"install-angular-project","status":"publish","type":"post","link":"https:\/\/devopsopen.com\/index.php\/2023\/09\/15\/install-angular-project\/","title":{"rendered":"Install Node and Angular project"},"content":{"rendered":"<h2>Install NPM and Nodejs<\/h2>\n<h3>First method (traditional)<\/h3>\n<p>Create an Angular project need to install npm( nodejs) and angular cli<br \/>\nGet binnary nodeJs's file to install nodejs and npm<\/p>\n<blockquote>\n<blockquote>\n<p>URL : <a href=\"https:\/\/nodejs.org\/en\/download\">https:\/\/nodejs.org\/en\/download<\/a> <\/p>\n<\/blockquote>\n<\/blockquote>\n<p>If you are in Windows environment, just click and install .exe file<br \/>\nInto Linux environment, <\/p>\n<blockquote>\n<blockquote>\n<p>curl -fsSL <a href=\"https:\/\/deb.nodesource.com\/setup_14.x\">https:\/\/deb.nodesource.com\/setup_14.x<\/a> | sudo -E bash -<br \/>\nsudo apt-get install -y nodejs<\/p>\n<\/blockquote>\n<\/blockquote>\n<h3>Second method (New)<\/h3>\n<p>You can use nvm to install node (npm). This tools let you switch between multiple version of node :<br \/>\n<a href=\"https:\/\/github.com\/nvm-sh\/nvm\" title=\"install nvm links\">install nvm links<\/a><\/p>\n<pre><code>nvm install 16  (mean install nodejs version 16)\nnvm use 16 (mean use the version 16)\nnvm install 14 (mean install nodejs version 16)\nnvm use 14 (mean install nodejs version 16)<\/code><\/pre>\n<h2>Install Angular CLI<\/h2>\n<p>install angular in you general context<\/p>\n<blockquote>\n<blockquote>\n<p>npm install -g @angular\/cli<br \/>\nNode --version<br \/>\nnpm --version<\/p>\n<\/blockquote>\n<\/blockquote>\n<h2>Angular commands<\/h2>\n<p>Create new angular project<\/p>\n<blockquote>\n<blockquote>\n<p>ng new name_of_the_project<\/p>\n<\/blockquote>\n<\/blockquote>\n<p>if you have a remote project<\/p>\n<blockquote>\n<blockquote>\n<p>git clone name_of_the_project<br \/>\nnpm install<\/p>\n<\/blockquote>\n<\/blockquote>\n<p>To build the project. The build artifacts will be stored in the dist\/ directory.<\/p>\n<blockquote>\n<blockquote>\n<p>Run ng build<\/p>\n<\/blockquote>\n<\/blockquote>\n<p>Running unit tests<\/p>\n<blockquote>\n<blockquote>\n<p>Run ng test <\/p>\n<\/blockquote>\n<\/blockquote>\n<p>to execute the unit tests via Karma.<\/p>\n<p>Running end-to-end tests<\/p>\n<blockquote>\n<blockquote>\n<p>Run ng e2e <\/p>\n<p>to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities.<\/p>\n<\/blockquote>\n<\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>Install NPM and Nodejs First method (traditional) Create an Angular project need to install npm( nodejs) and angular cli Get binnary nodeJs&#8217;s file to install nodejs and npm URL : https:\/\/nodejs.org\/en\/download If you are in Windows environment, just click and install .exe file Into Linux environment, curl -fsSL https:\/\/deb.nodesource.com\/setup_14.x | sudo -E bash &#8211; sudo apt-get install -y nodejs Second method (New) You can use nvm to install node (npm). This tools let you switch between multiple version of node : install nvm links nvm install 16 (mean install nodejs version 16) nvm use 16 (mean use the version 16)\u2026<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_uag_custom_page_level_css":""},"categories":[9],"tags":[],"blocksy_meta":{"styles_descriptor":{"styles":{"desktop":"","tablet":"","mobile":""},"google_fonts":[],"version":5}},"uagb_featured_image_src":{"full":false,"thumbnail":false,"medium":false,"medium_large":false,"large":false,"1536x1536":false,"2048x2048":false},"uagb_author_info":{"display_name":"admin","author_link":"https:\/\/devopsopen.com\/index.php\/author\/admin_bak\/"},"uagb_comment_info":75,"uagb_excerpt":"Install NPM and Nodejs First method (traditional) Create an Angular project need to install npm( nodejs) and angular cli Get binnary nodeJs's file to install nodejs and npm URL : https:\/\/nodejs.org\/en\/download If you are in Windows environment, just click and install .exe file Into Linux environment, curl -fsSL https:\/\/deb.nodesource.com\/setup_14.x | sudo -E bash - sudo&hellip;","_links":{"self":[{"href":"https:\/\/devopsopen.com\/index.php\/wp-json\/wp\/v2\/posts\/367"}],"collection":[{"href":"https:\/\/devopsopen.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devopsopen.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devopsopen.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/devopsopen.com\/index.php\/wp-json\/wp\/v2\/comments?post=367"}],"version-history":[{"count":3,"href":"https:\/\/devopsopen.com\/index.php\/wp-json\/wp\/v2\/posts\/367\/revisions"}],"predecessor-version":[{"id":390,"href":"https:\/\/devopsopen.com\/index.php\/wp-json\/wp\/v2\/posts\/367\/revisions\/390"}],"wp:attachment":[{"href":"https:\/\/devopsopen.com\/index.php\/wp-json\/wp\/v2\/media?parent=367"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devopsopen.com\/index.php\/wp-json\/wp\/v2\/categories?post=367"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devopsopen.com\/index.php\/wp-json\/wp\/v2\/tags?post=367"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}