<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Nhlelo Mngadi on Medium]]></title>
        <description><![CDATA[Stories by Nhlelo Mngadi on Medium]]></description>
        <link>https://medium.com/@nmngadi?source=rss-f007007c1c8a------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*ygFgBP0Y7cucKBixfwB0BA.jpeg</url>
            <title>Stories by Nhlelo Mngadi on Medium</title>
            <link>https://medium.com/@nmngadi?source=rss-f007007c1c8a------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 04:24:34 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@nmngadi/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Angular Ivy]]></title>
            <link>https://medium.com/dvt-engineering/angular-ivy-6cb0c78a2673?source=rss-f007007c1c8a------2</link>
            <guid isPermaLink="false">https://medium.com/p/6cb0c78a2673</guid>
            <category><![CDATA[ivy]]></category>
            <category><![CDATA[front-end-development]]></category>
            <category><![CDATA[angular-9]]></category>
            <dc:creator><![CDATA[Nhlelo Mngadi]]></dc:creator>
            <pubDate>Wed, 29 Jul 2020 14:18:16 GMT</pubDate>
            <atom:updated>2020-07-29T14:18:16.612Z</atom:updated>
            <content:encoded><![CDATA[<p>All you need to know and why you should migrate your project to Angular Ivy.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*O61s29xYAOor9UMFGqULnQ.png" /></figure><h3>What is Angular Ivy</h3><p>The big buzz word that has been going around since the release of Angular 9 has to be Angular Ivy. Angular Ivy, also known as “Angular next-generation compilation and rendering pipeline ‘s,” is the replacement of the previous View Engine compiler in the Angular framework. Ivy was in a preview version since Angular 8, however previously you had to manually opt into using Ivy. The release of Angular 9 moves angular applications to the Ivy compiler and runtime by default.</p><h3>What makes Angular Ivy special?</h3><p>Ivy is designed to use tree-shaking which improves the way Angular manages components, tree shaking ensures the cleanup and removal of unused code which results in reducing the size of the compiled files. Ivy offers other advantages listed below.</p><ul><li>Reduced bundle sizes</li><li>Improved 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>Faster build times, enabling AOT on by default</li><li>Improved Internationalization</li></ul><h3>How is Angular ivy different from View Engine?</h3><p>While both of these are achieving the same goal which is to take the templates and components written in angular and translates them into regular HTML and JavaScript that the browser understands in order to read and display. Ivy has introduced a different approach to doing this by achieving smaller, faster, and simpler bundle sizes, but this also extends further to the compilation process. The two main key concepts responsible for this are locality and tree-shaking.</p><p><strong>The principle of locality</strong></p><p>The principle of locality means that each component should compile using only its own information. This helps with achieving faster build times. In the process of compiling a component in Ivy, Ivy only requires information about the component itself, except for the name and package name of its declarable dependencies. Ivy doesn’t require additional metadata of any declarable dependencies in order to compile a component. The previous compiler View Engine did not have this feature. View Engine needs information about all its declarable dependencies, their declarable dependencies, and so on in order to compile because it needs to do a static analysis of all code and generate a file called <em>metadata.json</em> that could be used to generate the compilation instructions. This means that Angular libraries cannot be AOT-compiled using View Engine. However, Ivy allowed Angular to start using <a href="https://angular.io/guide/aot-compiler">AOT </a>compilation during the development process which in the past was limited to production builds because of the lengthy compilation time it needed.</p><p><strong>Tree-Shaking</strong></p><p>Ivy can achieve smaller bundles because it uses the Ivy Instruction Set. Ivy Instruction Set is a set of tree-shakable runtime rendering instructions. Our bundles will only include the instructions needed by the project.</p><p>However, it is important to know that the difference in bundle sizes between View Engine and Ivy will vary based on the size of our application and the 3rd party libraries used in the project.</p><p>The tree-shakable features of Angular include:</p><ul><li>Template syntax</li><li>Dependency injection</li><li>Content projection</li><li>Structural directives</li><li>Lifecycle hooks</li><li>Pipes</li><li>Queries</li><li>Listeners</li></ul><h4>Other notable changes introduced in Ivy</h4><ul><li>Lazy-loaded components</li><li>New debugging API in Development mode</li><li>Removing dependence on platform-browser</li><li>No NgFactory file anymore</li></ul><h3>How to update to Angular 9</h3><p>The process of upgrading from Angular 8 to Angular 9 is simple. For more information and guidance visit <a href="https://update.angular.io/">update.angular.io</a>.</p><p>First, update to the latest version of Angular 8</p><pre>ng update @angular/cli@8 @angular/core@8</pre><p>Then, update to Angular 9</p><pre>ng update @angular/cli @angular/core</pre><h3>Performance improvements with Ivy</h3><p>To demonstrate the performance improvements I used a small angular project I built months ago using Angular 9. In order to show the difference in output I had to change the compiler since enableIvy flag is set to true by default, as of version 9.</p><p>The following example shows how to set the enableIvy option to false in order to opt-out of Ivy.</p><p>In tsconfig.app.json add the following snippet :</p><pre>“angularCompilerOptions”: {<br> “enableIvy”: false<br> }</pre><p>NB: To switch back to Ivy just set enableIvy to true or remove the code snippet added</p><p><strong>With View Engine</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cSKOF-_G-OVJ5V7cFdU-VQ.png" /></figure><p><strong>With Ivy</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Nyz2AqO7nI9C8O1EjH9jUg.png" /></figure><p>In conclusion, we can see that with Angular Ivy enabled we can achieve a smaller bundle size-reduction around 30% if you working on a small project. According to the Angular team, large apps will see a 25–40% decrease, and medium apps decrease minimally. Also notable with Ivy, the ngFactory files have been removed and everything is bundled into one file. The build time for the application was also reduced to10087ms which means faster builds can be achieved with Ivy.</p><p>I hope you have gained something useful and you will consider using Ivy and upgrading your older projects to use Ivy. It’s definitely the beginning for Ivy and more improvements are to come in the future versions of Angular.</p><h3>Additional Resources</h3><p>Finally, I have included some additional resources if you are interested in finding out more about Ivy.</p><p><a href="https://angular.io/guide/ivy">https://angular.io/guide/ivy</a> -Angular Official Documentation</p><p><a href="https://update.angular.io/#9.0:10.0">https://update.angular.io/#9.0:10.0</a> -Version update Angular Documentation</p><p><a href="https://developer.okta.com/blog/2020/02/12/angular-ivy">https://developer.okta.com/blog/2020/02/12/angular-ivy</a>- What Is Angular Ivy and Why Is It Awesome?</p><p><a href="https://blog.angular.io/version-9-of-angular-now-available-project-ivy-has-arrived-23c97b63cfa3">https://blog.angular.io/version-9-of-angular-now-available-project-ivy-has-arrived-23c97b63cfa3</a> — Project Ivy has Arrived</p><p><a href="https://indepth.dev/a-look-at-major-features-in-the-angular-ivy-version-9-release/">https://indepth.dev/a-look-at-major-features-in-the-angular-ivy-version-9-release/</a> — A look at major features in the Angular Ivy version 9 release</p><p>Thanks to <a href="https://medium.com/u/47c62db36a6e">Kennedy Cipiso Sigauke</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6cb0c78a2673" width="1" height="1" alt=""><hr><p><a href="https://medium.com/dvt-engineering/angular-ivy-6cb0c78a2673">Angular Ivy</a> was originally published in <a href="https://medium.com/dvt-engineering">DVT Software Engineering</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>