{"id":310,"date":"2018-05-29T14:29:00","date_gmt":"2018-05-29T12:29:00","guid":{"rendered":"https:\/\/celilsemi.erkiner.com\/blog\/?p=310"},"modified":"2023-12-02T04:08:05","modified_gmt":"2023-12-02T02:08:05","slug":"what-is-new-in-angular-6","status":"publish","type":"post","link":"https:\/\/celilsemi.erkiner.com\/blog\/what-is-new-in-angular-6\/","title":{"rendered":"What is New in Angular 6?"},"content":{"rendered":"\n<h3 class=\"wp-block-heading\" id=\"ng-add\">ng add command<\/h3>\n\n\n\n<p><code><strong>ng add<\/strong><\/code>\u00a0is a new command in Angular-CLI that helps you install and download new packages in your angular apps. It works the same as npm, but it doesn\u2019t replace it.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"ng-update\">ng update command<\/h3>\n\n\n\n<p><code><strong>ng update<\/strong><\/code>\u00a0is a new Angular-CLI command too. It\u2019s used to update and upgrade your packages. It\u2019s really helpful, for example, when you want to upgrade from Angular 5 to Angular 6, or any other package in your Angular app.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>providedI<\/strong>n property<\/h3>\n\n\n\n<p>Now with Angular 6, you can provide your service inside the supervisor itself by putting the\u00a0<code><strong>providedIn:root<\/strong>\u00a0<\/code>property within the &#8220;<code><strong>@injectable\"\u00a0<\/strong><\/code><strong>decorator.<\/strong><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">ng-template directive<\/h3>\n\n\n\n<p>You can use<code><strong>\u00a0ng-template<\/strong><\/code>\u00a0to render the HTML instead of the\u00a0<code><strong>template<\/strong><\/code>\u00a0tag in the new version of Angular.\u00a0<code><strong>ng-template<\/strong><\/code>\u00a0is an Angular element, and it works when it is used with a\u00a0<a href=\"https:\/\/angular.io\/guide\/structural-directives\">structural directive<\/a>\u00a0such as\u00a0<code><strong>*ngFor<\/strong><\/code>\u00a0and\u00a0<code><strong>*ngIf<\/strong><\/code><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"angular-elements\">Angular elements<\/h3>\n\n\n\n<p>Angular 6 introduced us to Angular elements. You\u2019re able to render your Angular elements as native web elements, and they\u2019re interpreted as trusted HTML elements.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"upgrading-to-rxjs-6-0-0\">RxJS 6.0.0<\/h3>\n\n\n\n<p>Angular 6 uses the latest version of Rxjs library. Now you can migrate the newest features of RxJS 6 in your Angular App.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>ng add command ng add\u00a0is a new command in Angular-CLI that helps you install and download new packages in your angular apps. It works the same as npm, but it doesn\u2019t replace it. ng update command ng update\u00a0is a new Angular-CLI command too. It\u2019s used to update and upgrade your packages. It\u2019s really helpful, for [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"default","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"default","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"set","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[7],"tags":[22,4,51,46],"class_list":["post-310","post","type-post","status-publish","format-standard","hentry","category-front-end","tag-angular","tag-javascript","tag-rxjs","tag-typescript"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/celilsemi.erkiner.com\/blog\/wp-json\/wp\/v2\/posts\/310","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/celilsemi.erkiner.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/celilsemi.erkiner.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/celilsemi.erkiner.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/celilsemi.erkiner.com\/blog\/wp-json\/wp\/v2\/comments?post=310"}],"version-history":[{"count":2,"href":"https:\/\/celilsemi.erkiner.com\/blog\/wp-json\/wp\/v2\/posts\/310\/revisions"}],"predecessor-version":[{"id":386,"href":"https:\/\/celilsemi.erkiner.com\/blog\/wp-json\/wp\/v2\/posts\/310\/revisions\/386"}],"wp:attachment":[{"href":"https:\/\/celilsemi.erkiner.com\/blog\/wp-json\/wp\/v2\/media?parent=310"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/celilsemi.erkiner.com\/blog\/wp-json\/wp\/v2\/categories?post=310"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/celilsemi.erkiner.com\/blog\/wp-json\/wp\/v2\/tags?post=310"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}