{"id":316,"date":"2020-02-29T16:41:00","date_gmt":"2020-02-29T14:41:00","guid":{"rendered":"https:\/\/celilsemi.erkiner.com\/blog\/?p=316"},"modified":"2020-05-29T16:52:21","modified_gmt":"2020-05-29T14:52:21","slug":"what-is-new-in-angular-9","status":"publish","type":"post","link":"https:\/\/celilsemi.erkiner.com\/blog\/what-is-new-in-angular-9\/","title":{"rendered":"What is New in Angular 9?"},"content":{"rendered":"\n<h3 class=\"wp-block-heading\" id=\"a3d6\">Ivy<\/h3>\n\n\n\n<p>Version 9 moves all applications to use the\u00a0<a rel=\"noreferrer noopener\" href=\"https:\/\/v9.angular.io\/guide\/ivy\" target=\"_blank\">Ivy compiler and runtime<\/a>\u00a0by default. This offers numerous advantages:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Smaller bundle sizes<\/li><li>Faster testing<\/li><li>Better debugging<\/li><li>Improved CSS class and style binding<\/li><li>Improved type checking<\/li><li>Improved build errors<\/li><li>Improved build times, enabling AOT on by default<\/li><li>Improved Internationalization<\/li><\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"ng-add\"><strong>New options for &#8216;<em>providedIn&#8217;<\/em><\/strong><\/h3>\n\n\n\n<p>In addition to the previous&nbsp;<code>root<\/code>&nbsp;and module options, you have two additional options.<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><code>platform<\/code>\u2014 Specifying\u00a0<code>providedIn: 'platform'<\/code>\u00a0makes the service available in a special singleton platform injector that is shared by all applications on the page.<\/li><li><code>any<\/code>\u2014 Provides a unique instance in every module (including lazy modules) that injects the token.<\/li><\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"a287\">New components<\/h3>\n\n\n\n<p>You can now include capabilities from YouTube and Google Maps in your applications.<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>You can render a YouTube Player inline within your application with the new<a href=\"https:\/\/github.com\/angular\/components\/tree\/master\/src\/youtube-player\" target=\"_blank\" rel=\"noreferrer noopener\">&nbsp;youtube-player<\/a>. After you load the YouTube IFrame player API, this component will take advantage of it.<\/li><li>We are also introducing&nbsp;<a href=\"https:\/\/github.com\/angular\/components\/tree\/master\/src\/google-maps\" target=\"_blank\" rel=\"noreferrer noopener\">google-maps<\/a>&nbsp;components. These components make it easy to render Google Maps, display markers, and wire up interactivity in a way that works like a normal Angular component, saving you from needing to learn the full&nbsp;<a href=\"https:\/\/developers.google.com\/maps\/documentation\/javascript\/tutorial\" target=\"_blank\" rel=\"noreferrer noopener\">Google Maps API<\/a>.<\/li><\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"ac54\">Web Worker Support<\/h3>\n\n\n\n<p>You can now generate new web workers from the CLI. Web workers allow you to offload work to a background thread, for any sort of cpu-intensive processing such as image or video manipulation. <a rel=\"noreferrer noopener\" href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/API\/Web_Workers_API\/Using_web_workers\" target=\"_blank\">Web workers<\/a>&nbsp;are a great way to speed up your application.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"angular-elements\">TypeScript 3.7 support<\/h3>\n\n\n\n<p>Angular has been updated to work with TypeScript 3.6 and 3.7, including the extremely popular\u00a0<a rel=\"noreferrer noopener\" href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/JavaScript\/Reference\/Operators\/Optional_chaining\" target=\"_blank\">optional chaining<\/a>\u00a0feature in TypeScript 3.7.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Ivy Version 9 moves all applications to use the\u00a0Ivy compiler and runtime\u00a0by default. This offers numerous advantages: Smaller bundle sizes Faster testing Better debugging Improved CSS class and style binding Improved type checking Improved build errors Improved build times, enabling AOT on by default Improved Internationalization New options for &#8216;providedIn&#8217; In addition to the previous&nbsp;root&nbsp;and [&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":"default","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-316","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\/316","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=316"}],"version-history":[{"count":1,"href":"https:\/\/celilsemi.erkiner.com\/blog\/wp-json\/wp\/v2\/posts\/316\/revisions"}],"predecessor-version":[{"id":318,"href":"https:\/\/celilsemi.erkiner.com\/blog\/wp-json\/wp\/v2\/posts\/316\/revisions\/318"}],"wp:attachment":[{"href":"https:\/\/celilsemi.erkiner.com\/blog\/wp-json\/wp\/v2\/media?parent=316"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/celilsemi.erkiner.com\/blog\/wp-json\/wp\/v2\/categories?post=316"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/celilsemi.erkiner.com\/blog\/wp-json\/wp\/v2\/tags?post=316"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}