Angular πŸ‡ΊπŸ‡¦ - practical notes
1.63K subscribers
1.6K photos
1 file
532 links
Angular - practical notes

This group is for posting practical notes for Angular developers. Mostly all posts are for quick implementation https://t.me/angular_practical_notes (Commenting on posts only in ENG and UA langs here). Welcome!
Download Telegram
WeakRef

A WeakRef object contains a weak reference to an object, which is called its target or referent. A weak reference to an object is a reference that does not prevent the object from being reclaimed by the garbage collector. In contrast, a normal (or strong) reference keeps an object in memory. When an object no longer has any strong references to it, the JavaScript engine's garbage collector may destroy the object and reclaim its memory. If that happens, you can't get the object from a weak reference anymore.
This example starts a counter shown in a DOM element, stopping when the element doesn’t exist anymore.


#angular #weakref

βœ… Link: https://medium.com/@bluetch/javascript-es6-es7-es8-es9-es10-es11-and-es12-519d8be7d48c
Π‘ollection of HTML tips

#html

1. Capture attribute to open your device camera
<input type="file" capture="user" accept="image/*">


2. Automatic website refresh
<head>
<meta http-equiv="refresh" content="10">
</head>


3. Activate spellcheck
<input type="text" spellcheck="true" lang="en">


4. Specify file type to be uploaded
<input type="file" accept=".jpeg,.png">


5. Automatically download on link click
<a href="image.png" download>
Implement Code Splitting for Smaller Bundles

#angular #webpack

Install dependencies
npm install --save-dev webpack webpack-cli webpack-dev-server html-webpack-plugin clean-webpack-plugin


βœ… Link: https://guillaume-ferber.medium.com/maximizing-performance-with-angular-tips-and-tricks-for-efficient-code-76939fe7333b