{"id":1069,"date":"2023-06-14T05:00:00","date_gmt":"2023-06-14T12:00:00","guid":{"rendered":"http:\/\/www.angulartraining.com\/daily-newsletter\/?p=1069"},"modified":"2023-06-13T21:51:13","modified_gmt":"2023-06-14T04:51:13","slug":"whats-new-in-angular-16-1","status":"publish","type":"post","link":"https:\/\/www.angulartraining.com\/daily-newsletter\/whats-new-in-angular-16-1\/","title":{"rendered":"What&#8217;s new in Angular 16.1?"},"content":{"rendered":"\n<p>Angular 16.1 was released just in time for <a href=\"https:\/\/ng-conf.org\/\" target=\"_blank\" rel=\"noopener\" title=\"\">ng-conf 2023<\/a> (side note: If you&#8217;re in Salt Lake City, feel free to come to meet me and say hi &#8211; you&#8217;ll get <a href=\"https:\/\/twitter.com\/AlainChautard\/status\/1668777652331884544\" target=\"_blank\" rel=\"noopener\" title=\"\">a sticker and a $20 coupon<\/a> for my <a href=\"https:\/\/angular-training.getlearnworlds.com\/courses\" target=\"_blank\" rel=\"noopener\" title=\"\">video courses<\/a> or <a href=\"https:\/\/www.angulartraining.com\/angular-certification.html\" target=\"_blank\" rel=\"noopener\" title=\"\">certification exams<\/a>).<\/p>\n\n\n\n<p>There are <strong>three new features<\/strong> in Angular 16.1:<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Transform option for @Input()<\/h2>\n\n\n\n<p>We can now have a function that transforms an input value to make it fit the needs of a component. Say, for instance, your input value is an object, and you want to extract one property out of it or return a boolean value if it passes a given check; then transform is what you need:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.angulartraining.com\/daily-newsletter\/wp-content\/uploads\/2023\/06\/image-11.png\" alt=\"\" class=\"wp-image-1070\" width=\"339\" height=\"296\" srcset=\"https:\/\/www.angulartraining.com\/daily-newsletter\/wp-content\/uploads\/2023\/06\/image-11.png 722w, https:\/\/www.angulartraining.com\/daily-newsletter\/wp-content\/uploads\/2023\/06\/image-11-300x262.png 300w\" sizes=\"auto, (max-width: 339px) 100vw, 339px\" \/><\/figure>\n<\/div>\n\n\n<p><\/p>\n\n\n\n<p>This simple example (<a href=\"https:\/\/stackblitz.com\/edit\/stackblitz-starters-oghbcq?description=An%20angular-cli%20project%20based%20on%20@angular\/animations,%20@angular\/common,%20@angular\/compiler,%20@angular\/core,%20@angular\/forms,%20@angular\/platform-browser,%20@angular\/platform-browser-dynamic,%20@angular\/router,%20core-js,%20rxjs,%20tslib%20and%20zone.js&amp;file=src%2Finput-test%2Finput-test.component.ts,src%2Fmain.ts&amp;title=Angular%20Starter\" target=\"_blank\" rel=\"noopener\" title=\"\">code here<\/a>) illustrates what can be done with the new option.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Support for Typescript 5.1<\/h2>\n\n\n\n<p>There isn&#8217;t a ton of new things in <a href=\"https:\/\/devblogs.microsoft.com\/typescript\/announcing-typescript-5-1\/\" target=\"_blank\" rel=\"noopener\" title=\"\">Typescript 5.1<\/a>, mostly that now we can have setters and getters that use different types and have functions that return <code>undefined<\/code>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Support for fetch() in HttpClient<\/h2>\n\n\n\n<p>This is in developer preview. You can enable it in the configuration of your <code>HttpClient<\/code> as follows:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.angulartraining.com\/daily-newsletter\/wp-content\/uploads\/2023\/06\/image-12.png\" alt=\"\" class=\"wp-image-1071\" width=\"547\" height=\"148\" srcset=\"https:\/\/www.angulartraining.com\/daily-newsletter\/wp-content\/uploads\/2023\/06\/image-12.png 902w, https:\/\/www.angulartraining.com\/daily-newsletter\/wp-content\/uploads\/2023\/06\/image-12-300x81.png 300w, https:\/\/www.angulartraining.com\/daily-newsletter\/wp-content\/uploads\/2023\/06\/image-12-768x208.png 768w\" sizes=\"auto, (max-width: 547px) 100vw, 547px\" \/><\/figure>\n<\/div>\n\n\n<p><\/p>\n\n\n\n<p>I&#8217;m not sure there are any benefits of using it right now, but it might open the door to integrations with other HTTP providers built on top of <code>fetch<\/code>. Wait and see. <\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>In any case, I&#8217;ll report my takeaways from ng-conf in the newsletter during the next few days. Exciting days ahead!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Angular 16.1 was released just in time for ng-conf 2023 (side note: If you&#8217;re in Salt Lake City, feel free to come to meet me and say hi &#8211; you&#8217;ll get a sticker and a $20 coupon for my video courses or certification exams). There are three new features in Angular 16.1: Transform option for [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-1069","post","type-post","status-publish","format-standard","hentry","category-angular"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.angulartraining.com\/daily-newsletter\/wp-json\/wp\/v2\/posts\/1069","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.angulartraining.com\/daily-newsletter\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.angulartraining.com\/daily-newsletter\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.angulartraining.com\/daily-newsletter\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.angulartraining.com\/daily-newsletter\/wp-json\/wp\/v2\/comments?post=1069"}],"version-history":[{"count":1,"href":"https:\/\/www.angulartraining.com\/daily-newsletter\/wp-json\/wp\/v2\/posts\/1069\/revisions"}],"predecessor-version":[{"id":1072,"href":"https:\/\/www.angulartraining.com\/daily-newsletter\/wp-json\/wp\/v2\/posts\/1069\/revisions\/1072"}],"wp:attachment":[{"href":"https:\/\/www.angulartraining.com\/daily-newsletter\/wp-json\/wp\/v2\/media?parent=1069"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.angulartraining.com\/daily-newsletter\/wp-json\/wp\/v2\/categories?post=1069"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.angulartraining.com\/daily-newsletter\/wp-json\/wp\/v2\/tags?post=1069"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}