Articles for August 2017

Shrinking Angular Bundles with the Angular Build Optimizer

Beginning with version 1.3.0-rc.0, the Angular CLI makes use of the Angular Build Optimizer. This is a nifty tool that transforms the emitted JavaScript code to make tree shaking more efficient. This can result in huge improvements regarding bundle size. In this post I’m describing some simple scenarios that show the potential of this newly introduced tool. If you want to reproduce these scenarios, you find the source code used in my GitHub repository.

Source: Angular Schulung, Workshop und Beratung in Deutschland, Österreich und der Schweiz | Shrinking Angular Bundles with the Angular Build Optimizer

If you think `ngDoCheck` means your component is being checked — read this article

There’s one question that comes up again and again on stackoverflow. The question is about ngDoCheck lifecycle hook that is triggered for a component that implements OnPush change detection strategy. It’s usually formulated something like:

I have used OnPush strategy for my component and no bindings have changed, but the ngDoCheck lifecycle hook is still triggered. Is the strategy not working?

Source: If you think `ngDoCheck` means your component is being checked — read this article

What’s new in Angular CLI 1.3? | Ninja Squad

Angular CLI 1.3.0 is out with some nice new features!It now officially supports ES2017 and TypeScript 2.4 and is ready for Angular 5 (which should be out shortly).You can check out what files you need to update using angular-cli-diff, for example if you are currently using 1.2.1: angular-cli-diff/compare/1.2.1…1.3.0Let’s see what new features we have!

Source: What’s new in Angular CLI 1.3? | Ninja Squad

How to manually bootstrap an Angular application – Angular In Depth

Angular has a concept of the running application instance that you can usually inject using ApplicationRef token. There potentially can be many applications on one platform. Each application is created from the module using bootstrapModule method. This is exactly the method that is used in main.ts. So the statement shown in the docs first creates a platform and then the application instance.

Source: How to manually bootstrap an Angular application – Angular In Depth