Hassam Ali
Member since Sep 2, 2019
- Profile: /members/14023-hassam-ali.htm
- URL: http://hassamali.com
- Comments: 21
Recent Blog Comments By Hassam Ali
-
You Can Render Anything In Angular
Posted on Nov 23, 2022 at 11:16 PM
Thanks for the kind words Ben! I too miss the old react with life cycle hooks, i know there are better ways to write the sample which I did but it should be the job of the framework to make right approach easy and bad approach hard.... read more »
-
You Can Render Anything In Angular
Posted on Nov 23, 2022 at 7:03 PM
I tried to replicate it with react hooks, here is what I come up with: https://codesandbox.io/s/native-elem-rovfgx?file=/src/MessengerComp.tsx... read more »
-
You Can Render Anything In Angular
Posted on Nov 21, 2022 at 7:25 PM
interesting read. i have worked with angular and react, and react also provides a similar escape hatch. my guess is all of frameworks allow an escape hatch like this.... read more »
-
Using Type Guards To Narrow Down Error Handling Types In Angular 14
Posted on Sep 21, 2022 at 2:26 PM
😂... read more »
-
Using Type Guards To Narrow Down Error Handling Types In Angular 14
Posted on Sep 21, 2022 at 12:23 PM
@Ben, sounds good, i also prefer to keep the error handling specific to component and have a middleware/interceptor to convert the wording of message.... read more »
-
Using Type Guards To Narrow Down Error Handling Types In Angular 14
Posted on Sep 19, 2022 at 8:11 PM
I think unknown is more appropriate because then compiler forces the consumer to properly typecast the variable before using. I think its good feature to know. In production application where do you prefer to handle the error and give feedback to user. I noticed some people use a central s... read more »
-
Rendering Text To Canvas With Adjusted X,Y Offsets For Better Cross-Browser Consistency
Posted on Sep 16, 2022 at 1:08 PM
I think it's a good solution apart from that it's hard to reason about text from bottom in xy. I will bookmark this post 😀 in case I need it.... read more »
-
Rendering Text To Canvas With Adjusted X,Y Offsets For Better Cross-Browser Consistency
Posted on Sep 14, 2022 at 11:06 AM
hmmm, interesting. according to MDN the default value of textBaseline is already alphabetic... read more »
-
Rendering Text To Canvas With Adjusted X,Y Offsets For Better Cross-Browser Consistency
Posted on Sep 14, 2022 at 9:43 AM
looking forward to read your findings 😀... read more »
-
Rendering Text To Canvas With Adjusted X,Y Offsets For Better Cross-Browser Consistency
Posted on Sep 12, 2022 at 9:43 AM
wow thats a lot of work for such a small thing 😅 i wonder if the same happens with fabric.js... read more »
-
Detecting Rendered Line Breaks In A Text Node In JavaScript
Posted on Aug 17, 2022 at 9:44 PM
This is nice use case of range.... read more »
-
Making Snow Animations In Angular 11.0.5
Posted on Jan 23, 2021 at 12:56 PM
Personally, I have found that creating a lot of instances of directives reduces the performances drastically. My guess is that the fans are turning on due to large number of instances of directives rather than css. You can also try using transform: translateZ(0) trick into moving css ren... read more »
-
IntersectionObserver API Performance: Many vs. Shared In Angular 11.0.5
Posted on Jan 23, 2021 at 12:49 PM
Thanks for write up Ben. It was helpful.... read more »
-
Copying Slack's Brilliant Virtual Scrollbar And Overflow Container In Angular 9.1.12
Posted on Jul 25, 2020 at 6:15 AM
Hi Ben, Very interesting write up. it's very clever of slack, I did not think it was possible without implementing custom scroll bars from scratch.... read more »
-
Applying CSS Flexbox To Pseudo-Elements
Posted on Jul 3, 2020 at 1:00 PM
Thanks for sharing this technique Ben. TIL!... read more »
-
Saving Temporary Form-Data To The SessionStorage API In Angular 9.1.9
Posted on May 26, 2020 at 2:53 PM
Hi, thanks for the write up. I had to do similar thing and stumbled upon this article https://netbasal.com/effortless-web-storage-persistence-in-angular-forms-cfa81ad23e30 which was very helpful.... read more »
-
I Prefer The Unary Plus (+) Operator Over parseInt() And ParseFloat() When Coercing Strings To Numbers In JavaScript
Posted on Apr 5, 2020 at 4:11 PM
Hi Ben, Nice find. I saw your tweet on twitter but was not able to grasp it. This article explains it nicely. Personally I prefer using + instead of Number constructor.... read more »
-
Experimenting With Chained Keyboard Events Using Event Plug-ins In Angular 9.1.0
Posted on Mar 31, 2020 at 12:13 PM
Hi Ben, That was a nice writeup! Is there any official documentation about event plugins? I am not able to find any.... read more »
-
Rendering A TemplateRef As A Child Of The Body Element In Angular 9.0.0-rc.5
Posted on Jan 7, 2020 at 3:35 PM
This is very similar to Angular Material Portals. I had recently done some thing similar to a dropdown which was being cut off because it's parent had overflow hidden element. So I used portal to render the template of the dropdown in parent component which did not have overflow: hidden set... read more »
-
Binding RxJS Observable Sources Outside Of The NgZone In Angular 6.0.2
Posted on Sep 3, 2019 at 1:17 AM
To be clear - and make sure I understand what you mean - you're saying that because the cdrRun() method is being executed as part of the View template, it is, by definition, called every time change-detection is run for that View. yeah! thats exactly what I meant. I also noticed that ... read more »