I was referring to the share operator.
I was referring to the share operator. I don’t mind using an imperative solution as long it’s encapsulated inside a function.I didn’t say your solution isn’t right. I just mentioned why I prefer my...
View ArticleMake Your Angular Directive Functionality Lazy
One of my recent tasks was to replace a legacy tooltip from our core components library with a new one. As always, I’m not trying to reinvent the wheel. To begin this task, I first find a stable native...
View ArticleBecause you don’t want the events it registers to trigger change detection.
Because you don’t want the events it registers to trigger change detection.
View ArticleNo. You pass a text, and tippy shows it. That’s all.
No. You pass a text, and tippy shows it. That’s all.
View ArticleAs you said, the difference is a large number of events registered in memory.
As you said, the difference is a large number of events registered in memory. Imagine the difference in larger dimensions like 2,000 elements etc. Moreover, based on the spec, the IntersectionObserver...
View ArticleYeap. That’s what I meant when I was saying “doesn’t work with any design”.
One of the major drawbacks of CDK virtual scroll (at least last time I was using it, that is) was that it required all items to share same height and the height to be declaredYeap. That’s what I meant...
View ArticleDifferent Ways to Pass Inputs to a Component in Angular
In this article, we’ll look at three different ways we can pass data to a component. In the following examples, we’re going to use a core select component, but these methods are relevant to any...
View ArticleThe docs said the it takes one element.
The docs said the it takes one element. https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserver/observeCan you show an example, please?
View ArticleEffortless Web Storage Persistence in Angular Forms
Imagine a case where a user fills out all or part of a form, and doesn’t get a chance to submit it. This could be caused by a sudden session timeout, or they hit the refresh button accidentally, or...
View ArticleNice catch! Thanks. It was a quick and dirty work :)
Nice catch! Thanks. It was a quick and dirty work :)
View ArticleQuick Tip for Angular Forms: Keep your markAllAsTouched DRY
Working with Angular Forms validation you’ve probably used the following code in your HTML to show errors:https://medium.com/media/a9b21bfcc7db4525f5500364e29caf87/hrefAnd in each submit handler you’ve...
View ArticleImplementing Grouping Checkbox Behavior with Angular Reactive Forms
A few days ago, a friend asked me how I’d implement grouping checkbox behavior (selecting multiple checkboxes with a single click) using Angular Reactive Forms. He wanted to create something like...
View ArticleExamining the Benefits of Reselect.js by Recreating It
Reselect is a library for optimizing Redux applications, that can prevent redundant renders, and improve the performance for combinations of multiple states or slices of states.The motivation behind...
View ArticleElegantly Manage SVG Icons in Angular Applications
svg-icon is a small library that offers a solution to a big problem: How to incorporate svgs into your templates in an orderly and efficient way.The svg-icon library enables using the <svg-icon>...
View ArticleA Simple, Reusable Solution for Binding URL Query Params to Angular Forms
A common behavior in web applications is to sync data in forms based on the values of the URL query params. For example, we may have a page with filters such as search input, and a select box where we...
View Article