{"id":334,"date":"2024-06-27T12:33:12","date_gmt":"2024-06-27T10:33:12","guid":{"rendered":"https:\/\/www.papadia.org\/?p=334"},"modified":"2024-07-16T14:02:38","modified_gmt":"2024-07-16T12:02:38","slug":"creazione-nuovo-progetto-in-angular-cli","status":"publish","type":"post","link":"https:\/\/www.papadia.org\/?p=334","title":{"rendered":"Creazione nuovo progetto in ANGULAR CLI"},"content":{"rendered":"\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"259\" height=\"194\" src=\"https:\/\/www.papadia.org\/wp-content\/uploads\/2024\/06\/logowik.png\" alt=\"\" class=\"wp-image-351\"\/><\/figure>\n\n\n\n<p>Appunti per la creazione di un nuovo progetto alla luce delle modifiche relative alle ultime versioni del CLI (<strong>C<\/strong>ommand-<strong>L<\/strong>ine <strong>I<\/strong>nterface)<\/p>\n\n\n\n<pre class=\"wp-block-code has-black-color has-text-color has-background\" style=\"background-color:#207daf\"><code><strong>ng new my-app --no-standalone --routing --ssr=false --style=scss<\/strong><\/code><\/pre>\n\n\n<p><strong> ng new<\/strong> <strong>\u2192<\/strong> <em>comando che crea nuovo progetto<\/em><\/p>\n<p><strong>my-app<\/strong> <strong>\u2192<\/strong>\u00a0<em>nome del progetto<\/em><\/p>\n<p><strong>&#8211;no-standalone<\/strong> <strong>\u2192<\/strong> flag che specifica che l&#8217;applicazione dovr\u00e0 essere generata con l&#8217;ngModules e non con componenti autonomi<\/p>\n<p><strong>&#8211;routing<\/strong> <strong>\u2192<\/strong> <em>genera un routin module per il progetto iniziale<\/em><\/p>\n<p><strong>&#8211;ssr=false<\/strong> <strong>\u2192<\/strong> <em>disabilita il Server Side Rendering<\/em><\/p>\n<p><strong> &#8211;style=scss<\/strong> <strong>\u2192<\/strong> <em>determina l&#8217;estensione dei file da utilizzare per i fogli di stile\u00a0<\/em><\/p>\n<p><strong>&#8211;directory<\/strong>\u00a0<strong>\u2192<\/strong> specifica il nome della cartella nella quale sar\u00e0 effettuata l&#8217;installazione<em>\u00a0<\/em><\/p>\n\n\n<p>Se poi volessimo creare anche i file per gli ambienti allora dovremmo farlo con:<\/p>\n\n\n\n<pre class=\"wp-block-code has-black-color has-text-color has-background\" style=\"background-color:#207daf\"><code><strong>ng g environments<\/strong><\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>Per aggiungere un nuovo componente, come per esempio un header o un footer alla nostra pagina usiamo il comando seguente:<\/p>\n\n\n\n<pre class=\"wp-block-code has-black-color has-text-color has-background\" style=\"background-color:#207daf\"><code><strong>ng generate component header<\/strong><\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code has-black-color has-text-color has-background\" style=\"background-color:#207daf\"><code><strong>ng g c header<\/strong><\/code><\/pre>\n\n\n\n<p> il secondo \u00e8 la forma breve<\/p>\n\n\n\n<p>Per rimuovere un componente, usiamo il comando seguente:<\/p>\n\n\n\n<pre class=\"wp-block-code has-black-color has-text-color has-background\" style=\"background-color:#207daf\"><code><\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Appunti per la creazione di un nuovo progetto alla luce delle modifiche relative alle ultime versioni del CLI (Command-Line Interface)<\/p>\n","protected":false},"author":2,"featured_media":338,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"colormag_page_container_layout":"default_layout","colormag_page_sidebar_layout":"default_layout","footnotes":""},"categories":[5,6,11],"tags":[],"class_list":["post-334","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-latest","category-primo-piano","category-sviluppo"],"_links":{"self":[{"href":"https:\/\/www.papadia.org\/index.php?rest_route=\/wp\/v2\/posts\/334","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.papadia.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.papadia.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.papadia.org\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.papadia.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=334"}],"version-history":[{"count":15,"href":"https:\/\/www.papadia.org\/index.php?rest_route=\/wp\/v2\/posts\/334\/revisions"}],"predecessor-version":[{"id":362,"href":"https:\/\/www.papadia.org\/index.php?rest_route=\/wp\/v2\/posts\/334\/revisions\/362"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.papadia.org\/index.php?rest_route=\/wp\/v2\/media\/338"}],"wp:attachment":[{"href":"https:\/\/www.papadia.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=334"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.papadia.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=334"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.papadia.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=334"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}