{"id":28,"date":"2018-12-23T10:20:15","date_gmt":"2018-12-23T10:20:15","guid":{"rendered":"http:\/\/www.datatype.co.in\/blog\/?p=28"},"modified":"2020-07-29T18:25:33","modified_gmt":"2020-07-29T18:25:33","slug":"create-angular-project-using-angular-cli","status":"publish","type":"post","link":"https:\/\/datatype.co.in\/blog\/create-angular-project-using-angular-cli\/","title":{"rendered":"Create Angular Project Using angular-cli"},"content":{"rendered":"\n<p> Creating angular seed or getting started project using angular-cli is pretty simple. In this article I will show you how it can be done in Windows. Follow the following steps \u2013 <\/p>\n\n\n\n<p><strong>Prerequisite<\/strong>: <\/p>\n\n\n\n<p>If&nbsp;<strong>nodejs<\/strong>&nbsp;is not installed in you machine, install it first. You can download nodejs from&nbsp;<a href=\"https:\/\/nodejs.org\/en\/\">https:\/\/nodejs.org\/en\/<\/a><\/p>\n\n\n\n<p>To verify nodejs installation, open command prompt and type the following commands \u2013<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>#> node -v\n#> npm -v<\/code><\/pre>\n\n\n\n<p> This will display installed nodejs and npm version. Note that npm comes with nodejs inbuilt. <\/p>\n\n\n\n<p><strong>Steps to create angular app using angular-cli:<\/strong><\/p>\n\n\n\n<p><strong>1. Install angular-cli<\/strong>:<\/p>\n\n\n\n<p> Open command prompt and run the following command <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>#> npm install -g @angular\/cli<\/code><\/pre>\n\n\n\n<p> We are installing angular-cli globally so that we don\u2019t need to install it in every project locally. <\/p>\n\n\n\n<p><strong>2. Create angular app<\/strong>:<\/p>\n\n\n\n<p> Open command prompt and run the following command &#8211;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>D:\\Projects> ng new first-angular-app<\/code><\/pre>\n\n\n\n<p>\n\nThis command will create an angular app in the folder&nbsp;<strong>first-angular-app.&nbsp;<\/strong><\/p>\n\n\n\n<p><strong>3. Run the app<\/strong>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>D:\\Projects> cd first-angular-app\nD:\\Projects\\first-angular-app> ng serve<\/code><\/pre>\n\n\n\n<p>\n\nNow, open browser and browse&nbsp;<a href=\"http:\/\/localhost:4200\/\">http:\/\/localhost:4200<\/a>, that\u2019s it! You have successfully created first angular app.\n\n<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Creating angular seed or getting started project using angular-cli is pretty simple. In this article I will show you how it can be done in Windows. Follow the following steps&nbsp;[ &hellip; ]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[15],"tags":[18,20,21,19],"class_list":["post-28","post","type-post","status-publish","format-standard","hentry","category-angular","tag-angular-cli","tag-angular-getting-started","tag-angular-seed-project","tag-create-angular-project-using-angular-cli","list-style-post"],"_links":{"self":[{"href":"https:\/\/datatype.co.in\/blog\/wp-json\/wp\/v2\/posts\/28","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/datatype.co.in\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/datatype.co.in\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/datatype.co.in\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/datatype.co.in\/blog\/wp-json\/wp\/v2\/comments?post=28"}],"version-history":[{"count":1,"href":"https:\/\/datatype.co.in\/blog\/wp-json\/wp\/v2\/posts\/28\/revisions"}],"predecessor-version":[{"id":29,"href":"https:\/\/datatype.co.in\/blog\/wp-json\/wp\/v2\/posts\/28\/revisions\/29"}],"wp:attachment":[{"href":"https:\/\/datatype.co.in\/blog\/wp-json\/wp\/v2\/media?parent=28"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/datatype.co.in\/blog\/wp-json\/wp\/v2\/categories?post=28"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/datatype.co.in\/blog\/wp-json\/wp\/v2\/tags?post=28"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}