{"id":16445,"date":"2017-12-05T15:00:00","date_gmt":"2017-12-05T15:00:00","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/premier_developer\/?p=16445"},"modified":"2020-03-27T09:46:26","modified_gmt":"2020-03-27T16:46:26","slug":"getting-started-with-node-js-angular-and-visual-studio-code","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/premier-developer\/getting-started-with-node-js-angular-and-visual-studio-code\/","title":{"rendered":"Getting Started with Node.js, Angular, and Visual Studio Code"},"content":{"rendered":"<p>This step-by-step guide on getting started with Node.js and Angular comes to us from Premier Developer consultant <a href=\"https:\/\/www.linkedin.com\/in\/crystal-tenn-6a0b9b67\/\" target=\"_blank\" rel=\"noopener noreferrer\">Crystal Tenn<\/a>.<\/p>\n<hr \/>\n<p>Here is a simple step by step guide to getting your Angular application setup with Visual Studio Code and Node. This guide will simply help you know what to install, the commands to run in PowerShell, and some basics about where to start building your app using Visual Studio Code.<\/p>\n<ol>\n<li>Install Node JS with default settings for everything\n<a href=\"https:\/\/nodejs.org\/en\/download\/\">https:\/\/nodejs.org\/en\/download\/<\/a><\/li>\n<li>Download Visual Studio Code:\n<a href=\"https:\/\/code.visualstudio.com\/download\">https:\/\/code.visualstudio.com\/download<\/a><\/li>\n<li>Open PowerShell in admin mode. Install Angular CLI:\n<pre class=\"brush: ps\">npm install -g @angular\/cli<\/pre>\n<\/li>\n<li>Navigate to the folder where you want to make your angular app. I went to my C:\/ directory in my PowerShell to run the following command. I am calling mine &#8220;my-new-angular-app&#8221; but you can name it anything you like.\n<pre class=\"brush: ps\">ng new my-new-angular-app<\/pre>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-35659\" src=\"http:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2017\/12\/angular1.png\" alt=\"\" width=\"628\" height=\"430\" srcset=\"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2017\/12\/angular1.png 628w, https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2017\/12\/angular1-300x205.png 300w\" sizes=\"(max-width: 628px) 100vw, 628px\" \/><\/li>\n<li>cd into your new app directory that you just created, in this case\n<pre class=\"brush: ps\">cd my-new-angular-app<\/pre>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-35660\" src=\"http:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2017\/12\/angular2.png\" alt=\"\" width=\"252\" height=\"35\" \/><\/li>\n<li>Build app and start server\n<pre class=\"brush: ps\">ng serve\r\n<\/pre>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/31\/2019\/04\/image9.png\"><img decoding=\"async\" title=\"image\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/31\/2019\/04\/image_thumb9.png\" alt=\"image\" width=\"557\" height=\"112\" border=\"0\" \/><\/a><\/li>\n<li>Navigate to <a href=\"http:\/\/localhost:4200\">http:\/\/localhost:4200<\/a>\n<a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/31\/2019\/04\/image10.png\"><img decoding=\"async\" title=\"image\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/31\/2019\/04\/image_thumb10.png\" alt=\"image\" width=\"628\" height=\"329\" border=\"0\" \/><\/a><\/li>\n<li>Open Visual Studio Code<\/li>\n<li>Click on File, Open Folder\n<a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/31\/2019\/04\/image11.png\"><img decoding=\"async\" title=\"image\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/31\/2019\/04\/image_thumb11.png\" alt=\"image\" width=\"213\" height=\"318\" border=\"0\" \/><\/a><\/li>\n<li>Open the <b>folder<\/b> that you created. In this case it would be my-new-angular-app. Hit Select Folder, as seen in screenshot below.\n<img decoding=\"async\" class=\"alignnone size-full wp-image-35662\" src=\"http:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2017\/12\/angular3.png.jpg\" alt=\"\" width=\"844\" height=\"635\" srcset=\"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2017\/12\/angular3.png.jpg 844w, https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2017\/12\/angular3.png-300x226.jpg 300w, https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2017\/12\/angular3.png-768x578.jpg 768w\" sizes=\"(max-width: 844px) 100vw, 844px\" \/><\/li>\n<li>package.json has all of your angular dependencies and other packages.<a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/31\/2019\/04\/image12.png\"><img decoding=\"async\" title=\"image\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/31\/2019\/04\/image_thumb12.png\" alt=\"image\" width=\"484\" height=\"587\" border=\"0\" \/><\/a><\/li>\n<li>You can add all your components in the app folder.\n<a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/31\/2019\/04\/image13.png\"><img decoding=\"async\" title=\"image\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/31\/2019\/04\/image_thumb13.png\" alt=\"image\" width=\"199\" height=\"628\" border=\"0\" \/><\/a><\/li>\n<li>In PowerShell, to stop your Server:\n<ol>\n<li>Hit Ctrl +C<\/li>\n<li>Then type &#8220;Y&#8221; and hit enter to stop it.<a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/31\/2019\/04\/image14.png\"><img decoding=\"async\" title=\"image\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/31\/2019\/04\/image_thumb14.png\" alt=\"image\" width=\"613\" height=\"335\" border=\"0\" \/><\/a><\/li>\n<\/ol>\n<\/li>\n<li>See the following link for docs on how to use Angular: <a href=\"https:\/\/angular.io\/guide\/styleguide\">https:\/\/angular.io\/guide\/styleguide<\/a><\/li>\n<\/ol>\n<p><span style=\"display: inline !important; float: none; background-color: #ffffff; color: #333333; font-family: Segoe UI,'Segoe UI Web Regular','Segoe UI Regular WestEuropean','Segoe UI',Tahoma,Arial,Roboto,'Helvetica Neue',sans-serif,'Apple Color Emoji','Segoe UI Emoji','Segoe UI Symbol'; font-size: 16.93px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;\">(<\/span><a class=\"x-hidden-focus\" href=\"https:\/\/devblogs.microsoft.com\/premier-developer\/introducao-ao-node-js\/\">Link to Portuguese version of this article<\/a><span style=\"display: inline !important; float: none; background-color: #ffffff; color: #333333; font-family: Segoe UI,'Segoe UI Web Regular','Segoe UI Regular WestEuropean','Segoe UI',Tahoma,Arial,Roboto,'Helvetica Neue',sans-serif,'Apple Color Emoji','Segoe UI Emoji','Segoe UI Symbol'; font-size: 16.93px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;\">)<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This step-by-step guide on getting started with Node.js and Angular comes to us from Premier Developer consultant Crystal Tenn. Here is a simple step by step guide to getting your Angular application setup with Visual Studio Code and Node. This guide will simply help you know what to install, the commands to run in PowerShell, [&hellip;]<\/p>\n","protected":false},"author":581,"featured_media":37840,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[51,76,284,377],"class_list":["post-16445","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-permierdev","tag-angular","tag-crystal-tenn","tag-node-js","tag-visual-studio-code"],"acf":[],"blog_post_summary":"<p>This step-by-step guide on getting started with Node.js and Angular comes to us from Premier Developer consultant Crystal Tenn. Here is a simple step by step guide to getting your Angular application setup with Visual Studio Code and Node. This guide will simply help you know what to install, the commands to run in PowerShell, [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/posts\/16445","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/users\/581"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/comments?post=16445"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/posts\/16445\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/media\/37840"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/media?parent=16445"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/categories?post=16445"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/tags?post=16445"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}