<?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 Mr. Aniket Adhav on Medium]]></title>
        <description><![CDATA[Stories by Mr. Aniket Adhav on Medium]]></description>
        <link>https://medium.com/@aniketadhav1997?source=rss-7d96b098b6cd------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*eDnm_kDVWugDA5iiH-8F8g.jpeg</url>
            <title>Stories by Mr. Aniket Adhav on Medium</title>
            <link>https://medium.com/@aniketadhav1997?source=rss-7d96b098b6cd------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 08:19:39 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@aniketadhav1997/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 22 Is Here — Everything You Need to Know]]></title>
            <link>https://medium.com/@aniketadhav1997/angular-22-is-here-everything-you-need-to-know-803a4c2e6390?source=rss-7d96b098b6cd------2</link>
            <guid isPermaLink="false">https://medium.com/p/803a4c2e6390</guid>
            <category><![CDATA[angular]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[frontend]]></category>
            <category><![CDATA[typescript]]></category>
            <dc:creator><![CDATA[Mr. Aniket Adhav]]></dc:creator>
            <pubDate>Wed, 10 Jun 2026 04:29:54 GMT</pubDate>
            <atom:updated>2026-06-10T04:29:54.114Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>Released June 3, 2026 — the Signal era has officially arrived</blockquote><p>Angular 22 is not just another version bump. It is a <strong>consolidation release</strong> — the experiments are over, the debates have settled, and the modern Angular is now fully production-ready. Signal Forms, Resource APIs, OnPush by default, AI tooling, and much more have landed stable in this single release.</p><p>If you have been holding back from adopting signals, this is your green light. Let’s break down every major feature you need to know.</p><h3>🔢 First Things First — Prerequisites</h3><p>Before upgrading, make sure your environment meets the new requirements:</p><ul><li><strong>TypeScript 6</strong> is now required. TypeScript 5.9 and below are no longer supported.</li><li><strong>Node.js 20</strong> support has been dropped. Node 22 is the minimum; Node 26 is fully supported.</li></ul><h3>1. OnPush Is Now the Default Change Detection Strategy</h3><p>This is the change that will affect the most Angular codebases in one go.</p><p>Until Angular 21, components without an explicit changeDetection setting used the old &quot;check always&quot; (Default) strategy — Angular would re-check the whole component tree on every browser event. In Angular 22, the default is now <strong>ChangeDetectionStrategy.OnPush</strong>.</p><p>This makes complete sense in a Signals-first world: when you use signals, Angular gets precise notifications about what changed, and OnPush means only the affected components get re-checked.</p><pre>// Angular 22 — OnPush is default, no changeDetection property needed<br>@Component({<br>  selector: &#39;app-counter&#39;,<br>  template: `{{ count() }}`<br>})<br>export class CounterComponent {<br>  count = signal(0); // Signals + OnPush — updates just work<br>}</pre><pre>// For legacy components, the migration adds Eager automatically<br>@Component({<br>  selector: &#39;app-legacy&#39;,<br>  changeDetection: ChangeDetectionStrategy.Eager, // old &quot;Default&quot; behavior<br>  template: `...`<br>})<br>export class LegacyComponent {}</pre><blockquote><em>💡 </em><strong><em>Note:</em></strong><em> The old </em><em>ChangeDetectionStrategy.Default has been renamed to </em><em>ChangeDetectionStrategy.Eager. An </em><strong><em>automatic migration</em></strong><em> is provided that adds </em><em>Eager to all your existing components during upgrade — your app will keep working exactly as before.</em></blockquote><p>Every Eager in your codebase becomes a clear to-do item: a component waiting to be modernized with signals.</p><h3>2. Signal Forms Are Stable 🎉</h3><p>This is the headline feature. <strong>Signal Forms</strong> — which shipped as experimental in Angular 21 — are now <strong>fully stable and production-ready</strong>.</p><p>Say goodbye to the verbose FormGroup, FormControl, and FormBuilder boilerplate of reactive forms. Signal Forms are reactive by design, deeply integrated with Angular&#39;s signal graph, and much more intuitive to write.</p><pre>import { Component, signal } from &#39;@angular/core&#39;;<br>import { form, FormField, required, email } from &#39;@angular/forms/signals&#39;;</pre><pre>interface LoginData {<br>  email: string;<br>  password: string;<br>}</pre><pre>@Component({<br>  selector: &#39;app-login&#39;,<br>  imports: [FormField],<br>  template: `<br>    &lt;form (submit)=&quot;onSubmit($event)&quot;&gt;<br>      &lt;input type=&quot;email&quot; [formField]=&quot;loginForm.email&quot; /&gt;</pre><pre>      @if (loginForm.email().touched() &amp;&amp; loginForm.email().invalid()) {<br>        @for (error of loginForm.email().errors(); track error) {<br>          &lt;p class=&quot;error&quot;&gt;{{ error.message }}&lt;/p&gt;<br>        }<br>      }</pre><pre>      &lt;input type=&quot;password&quot; [formField]=&quot;loginForm.password&quot; /&gt;<br>      &lt;button type=&quot;submit&quot; [disabled]=&quot;loginForm().invalid()&quot;&gt;Log In&lt;/button&gt;<br>    &lt;/form&gt;<br>  `<br>})<br>export class LoginComponent {<br>  loginModel = signal&lt;LoginData&gt;({ email: &#39;&#39;, password: &#39;&#39; });</pre><pre>  loginForm = form(this.loginModel, (f) =&gt; {<br>    required(f.email, { message: &#39;Email is required&#39; });<br>    email(f.email, { message: &#39;Please enter a valid email&#39; });<br>    required(f.password, { message: &#39;Password is required&#39; });<br>  });</pre><pre>  onSubmit(event: Event) {<br>    event.preventDefault();<br>    if (this.loginForm().valid()) {<br>      console.log(this.loginModel());<br>    }<br>  }<br>}</pre><h3>New Signal Forms Additions in v22</h3><ul><li><strong>minDate() and </strong><strong>maxDate() validators</strong> — Easily validate date fields with built-in date range validators.</li><li><strong>getError() method</strong> — Retrieve a specific validation error by key, with proper TypeScript narrowing.</li><li><strong>debounce on blur</strong> — Debounce field value changes specifically on blur events for cleaner async validation.</li><li><strong>reloadValidation()</strong> — Re-run async validators on a field and all its descendants (similar to updateValueAndValidity() in legacy forms).</li><li><strong>markAsTouched()</strong> now marks a field and <strong>all descendants</strong> as touched. Use { skipDescendants: true } to opt out.</li><li><strong>ControlValueAccessor compatibility</strong> — Legacy custom form components work seamlessly with Signal Forms now.</li><li><strong>FormValueControl</strong> is now fully compatible with legacy reactive and template-driven forms.</li></ul><pre>// New minDate/maxDate validators<br>protected readonly userForm = form(<br>  model,<br>  form =&gt; {<br>    minDate(form.birthDate, new Date(&#39;1900-01-01&#39;));<br>    maxDate(form.birthDate, new Date());<br>  }<br>);</pre><pre>// New getError() with type narrowing<br>@if (login.getError(&#39;minLength&#39;); as err) {<br>  &lt;div&gt;Minimum {{ err.minLength }} characters required&lt;/div&gt;<br>}</pre><h3>3. resource() and httpResource() Are Stable</h3><p>The other pillar of modern Angular reactive data fetching is now <strong>stable</strong>. The resource(), rxResource(), and httpResource() functions can be safely used in production.</p><p>These APIs let you keep async data fetching <em>inside</em> the signal graph — no more bouncing in and out of RxJS for every HTTP call.</p><pre>import { Component, signal } from &#39;@angular/core&#39;;<br>import { httpResource } from &#39;@angular/common/http&#39;;</pre><pre>@Component({<br>  selector: &#39;app-user-profile&#39;,<br>  template: `<br>    @if (user.isLoading()) {<br>      &lt;p&gt;Loading...&lt;/p&gt;<br>    } @else if (user.hasValue()) {<br>      &lt;h1&gt;{{ user.value().name }}&lt;/h1&gt;<br>      &lt;p&gt;{{ user.value().email }}&lt;/p&gt;<br>    }<br>  `<br>})<br>export class UserProfileComponent {<br>  userId = signal(1);</pre><pre>  // Automatically re-fetches whenever userId changes<br>  user = httpResource&lt;User&gt;(() =&gt; `/api/users/${this.userId()}`);<br>}</pre><p><strong>Bug fixes included:</strong></p><ul><li>rxResource and httpResource no longer leak subscriptions — a slow memory growth issue in long-running sessions has been fixed.</li><li>The resource URL sanitizer is now case-insensitive, closing a security bypass gap.</li></ul><h3>4. The New @Service Decorator</h3><p>Angular 22 introduces a new @Service decorator that simplifies service registration, replacing the verbose @Injectable({ providedIn: &#39;root&#39; }) pattern for most common cases.</p><pre>// Before<br>@Injectable({ providedIn: &#39;root&#39; })<br>export class UserService {<br>  getUsers() { ... }<br>}</pre><pre>// After (Angular 22)<br>@Service<br>export class UserService {<br>  getUsers() { ... }<br>}</pre><p>It improves code readability and reduces boilerplate — a small but welcome quality-of-life improvement.</p><h3>5. injectAsync() — Asynchronous Dependency Injection</h3><p>Angular 22 adds injectAsync(), which enables <strong>on-demand service loading</strong>. This means you can defer loading large dependencies until they are actually needed, supporting service-level code splitting and improving startup performance.</p><pre>@Component({ ... })<br>export class FeatureComponent {<br>  async loadHeavyService() {<br>    const heavyService = await injectAsync(HeavyAnalyticsService);<br>    heavyService.track(&#39;event&#39;);<br>  }<br>}</pre><p>Optional prefetching is also supported for even finer control over bundle loading strategies.</p><h3>6. debounced() — Debounce Any Signal (Experimental)</h3><p>A new experimental debounced() function lets you create a debounced version of <em>any signal</em> in your application — not just forms fields.</p><p>It returns a Resource (with loading, settled, and error states) rather than a plain signal, because a debounced value has lifecycle states.</p><pre>@Component({<br>  template: `<br>    &lt;input type=&quot;search&quot; placeholder=&quot;Search users&quot; [formField]=&quot;queryForm&quot; /&gt;<br>    @if (debouncedQuery.isLoading()) {<br>      &lt;p&gt;Waiting for stable input...&lt;/p&gt;<br>    }<br>    @for (user of filteredUsers.value(); track user.id) {<br>      &lt;li&gt;{{ user.name }}&lt;/li&gt;<br>    }<br>  `<br>})<br>class SearchComponent {<br>  protected readonly query = signal(&#39;&#39;);<br>  protected readonly queryForm = form(this.query);</pre><pre>  // Debounces the signal by 300ms<br>  protected readonly debouncedQuery = debounced(() =&gt; this.query(), 300);</pre><pre>  protected readonly filteredUsers = inject(UserService).search(<br>    this.debouncedQuery.value<br>  );<br>}</pre><h3>7. HTTP Client Now Uses fetch() by Default</h3><p>Angular’s HttpClient now uses the browser&#39;s <strong>Fetch API</strong> by default instead of XMLHttpRequest. This aligns with modern browser standards and improves interoperability with platform-native APIs.</p><p>Existing applications using XMLHttpRequest explicitly are not affected — this change applies to new projects and new HttpClient usage.</p><h3>8. WebMCP — Angular Meets AI Agents (Experimental)</h3><p>One of the most exciting and forward-looking additions in Angular 22 is <strong>WebMCP</strong> — a new experimental integration that lets AI agents running in the browser call your Angular application and its forms as <strong>tools</strong>.</p><p>This means your Angular app can become a first-class citizen in AI agentic workflows — an agent can interact with your form, read its state, or trigger actions — all through a standardized protocol.</p><pre>// WebMCP allows AI agents to interact with your Angular components<br>// as callable tools directly from the browser</pre><p>This is still experimental, but it signals Angular’s clear investment in AI-native application development.</p><h3>9. Angular Aria — Accessibility Is Stable</h3><p><strong>Angular Aria</strong> — the framework’s accessibility toolkit — has graduated to stable in this release. It provides first-class support for ARIA attributes, focus management, and keyboard interactions, making it easier to build accessible applications without reaching for third-party libraries.</p><h3>10. Route Parameter Inheritance by Default</h3><p>The router now <strong>inherits route parameters from all parent routes by default</strong>. Previously, accessing parent route params required explicit configuration. This simplifies deeply nested route structures and removes a lot of boilerplate in route param handling.</p><pre>// You can now access parent route params without extra config<br>export class ChildComponent {<br>  private route = inject(ActivatedRoute);</pre><pre>  ngOnInit() {<br>    // Works out of the box — no paramsInheritanceStrategy config needed<br>    const parentId = this.route.snapshot.params[&#39;parentId&#39;];<br>  }<br>}</pre><h3>11. Improved Memory Management with Route Cleanup</h3><p>New route cleanup APIs give developers explicit control over route-level dependencies and cached resources, preventing memory leaks in large applications. This is especially important for long-running SPAs where navigation over time can lead to silent memory growth.</p><h3>12. @boundary API Preview — Error Boundaries for Templates</h3><p>Angular 22 previews the @boundary API, which introduces <strong>template-level error boundaries</strong>. This allows you to define fallback UI experiences for specific sections of your template when a runtime error occurs, improving application resilience significantly.</p><pre>@boundary {<br>  &lt;app-risky-widget /&gt;<br>} @error {<br>  &lt;p&gt;Something went wrong. Please try again.&lt;/p&gt;<br>}</pre><h3>13. Security Improvements</h3><p>Angular 22 is also a serious security release:</p><ul><li><strong>platform-server</strong> now guards against Server-Side Request Forgery (SSRF) and path hijacking.</li><li>Suspicious and protocol-relative URLs are now rejected in HttpClient.</li><li>Backslash URL SSRF bypasses are closed.</li><li>Stricter sanitization for href, xlink:href, meta selectors, and placeholder bindings.</li><li>The <strong>HTTP transfer cache</strong> now skips cookie-bearing and withCredentials requests by default, preventing authenticated user-specific responses from leaking into server-side transferred state.</li></ul><blockquote><em>⚠️ </em><strong><em>Action required:</em></strong><em> If you use Angular Universal and cache credentialed responses, review your transfer cache configuration before upgrading.</em></blockquote><h3>14. Full TypeScript 6 Support</h3><p>Angular 22 fully supports <strong>TypeScript 6</strong>, letting you leverage the latest language features including improved type inference, new utility types, and better tooling support across the ecosystem.</p><h3>Should You Upgrade?</h3><p><strong>Yes — and the Angular team has made it straightforward.</strong></p><p>The automatic migration (ng update @angular/core@22) handles the heavy lifting:</p><ul><li>Adds ChangeDetectionStrategy.Eager to existing components to preserve their behavior.</li><li>Updates Default → Eager in decorators.</li><li>Flags breaking changes in Signal Forms (like the touched → touch() rename).</li></ul><p>If your app is already on Angular 21 with signals, upgrading to v22 unlocks a fully stable, production-ready signal stack. If you’re still on older patterns, the migration keeps you safe while giving you a clear roadmap for modernization.</p><h3>Summary</h3><p>Feature Status OnPush as default change detection ✅ Stable Signal Forms ✅ Stable resource() / httpResource() ✅ Stable Angular Aria ✅ Stable @Service decorator ✅ Stable injectAsync() ✅ Stable HTTP Client with Fetch by default ✅ Stable Route parameter inheritance ✅ Stable debounced() signal utility 🧪 Experimental WebMCP (AI agent integration) 🧪 Experimental @boundary error boundaries 👀 Preview</p><p>Angular 22 is the release where the framework’s two-year investment in signals pays off. The experiments have ended, the defaults have modernized, and the path forward is clear. Whether you’re starting a new project or upgrading an existing one, Angular 22 gives you a clean, performant, and future-proof foundation to build on.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HA-xxGO5S3iQ4aC3QHmrwA.png" /><figcaption>Angular 22 Cheat Sheet.</figcaption></figure><p><em>Happy coding! 🚀 If you found this useful, give it a clap and follow for more Angular content.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=803a4c2e6390" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How I Fixed “MySQL Shutdown Unexpectedly” in XAMPP After Corrupting ibdata1]]></title>
            <link>https://medium.com/@aniketadhav1997/how-i-fixed-mysql-shutdown-unexpectedly-in-xampp-after-corrupting-ibdata1-c5a298e8fbc0?source=rss-7d96b098b6cd------2</link>
            <guid isPermaLink="false">https://medium.com/p/c5a298e8fbc0</guid>
            <category><![CDATA[debugging]]></category>
            <category><![CDATA[xampp]]></category>
            <category><![CDATA[mysql]]></category>
            <dc:creator><![CDATA[Mr. Aniket Adhav]]></dc:creator>
            <pubDate>Fri, 22 May 2026 04:49:34 GMT</pubDate>
            <atom:updated>2026-05-22T04:49:34.256Z</atom:updated>
            <content:encoded><![CDATA[<blockquote><strong><em>The fix was already sitting in a backup folder — no reinstall needed.</em></strong></blockquote><p>If you’re using XAMPP and suddenly see this error in your control panel, you’re in the right place — this post might save you hours of painful debugging.</p><pre>Status change detected: stopped<br>Error: MySQL shutdown unexpectedly.<br>This may be due to a blocked port, missing dependencies,<br>improper privileges, a crash, or a shutdown by another method.</pre><p>I hit this exact wall while working on a PHP CodeIgniter project. My first instinct was port conflicts or corrupted database files — but the real culprit was something much simpler (and much more fixable).</p><h3>The Real Error Hidden in the Logs</h3><p>The XAMPP error panel is vague by design. The actual signal is buried inside the MySQL error log. Once I opened it, I found these two lines staring back at me:</p><pre>ERROR: Could not open mysql.plugin table<br>ERROR: Can&#39;t open and lock privilege tables: Table &#39;mysql.servers&#39; doesn&#39;t exist</pre><p>This wasn’t a port issue. MySQL was failing to boot because it couldn’t find its own system database.</p><p><strong>Root cause:</strong> I had renamed or deleted the ibdata1 file earlier while trying another fix. This caused MySQL to reinitialize and lose track of all its system tables — so it couldn&#39;t authenticate, load plugins, or start properly.</p><h3>What’s Actually Going Wrong</h3><p>MySQL depends on a special mysql folder inside your data directory:</p><pre>C:\xampp\mysql\data\mysql\</pre><p>This folder contains the internal system tables MySQL needs just to start up — privilege tables, plugin tables, server metadata, and authentication data. Without it, MySQL shuts down immediately after launch, every single time.</p><h3>The Fix — Step by Step</h3><p>XAMPP ships with a clean backup of these system tables out of the box. Here’s how to restore them.</p><h3>Step 1 — Open the XAMPP backup folder</h3><p>Navigate to the backup directory that comes bundled with your XAMPP installation:</p><pre>C:\xampp\mysql\backup\</pre><h3>Step 2 — Copy the mysql folder</h3><p>Inside the backup directory you’ll see a mysql folder. Copy the entire folder — don&#39;t move it, keep the backup intact.</p><h3>Step 3 — Paste into the data folder</h3><p>Go to your MySQL data directory and paste the copied folder:</p><pre>C:\xampp\mysql\data\</pre><p>If Windows asks to replace existing files, click <strong>Yes</strong>.</p><h3>Step 4 — Restart XAMPP as administrator</h3><p>This step matters. Fully close the XAMPP Control Panel, then reopen it by right-clicking and choosing <strong>Run as administrator</strong>. Start Apache and MySQL — MySQL should launch cleanly with no errors.</p><h3>Why This Actually Works</h3><p>XAMPP pre-packages a pristine copy of MySQL’s system database specifically for recovery situations like this. By restoring it, you’re giving MySQL back the internal tables it needs to boot — privilege tables, plugin registry, server metadata — without touching any of your actual project data.</p><blockquote><strong><em>Your project databases are likely safe.</em></strong><em> This fix only restores the system database. Your actual app databases (stored as separate folders in </em><em>data\) are usually untouched — unless the entire </em><em>data folder was corrupted or deleted.</em></blockquote><h3>What to Back Up Before Experimenting</h3><p>Before trying any MySQL fix in the future, protect these three things:</p><ul><li><strong>ibdata1</strong> — the InnoDB shared tablespace</li><li><strong>Individual database folders</strong> inside data\</li><li><strong>Regular </strong><strong>.sql exports</strong> via phpMyAdmin or mysqldump</li></ul><h3>Before You Reinstall Everything</h3><p>The usual advice floating around for this error involves deleting ib_logfile0, switching ports, or doing a full XAMPP reinstall. In my case, none of that was necessary — the real problem was a missing system database, and the fix was already sitting in the backup folder.</p><p>The lesson: always check the MySQL error log first. The XAMPP control panel tells you MySQL crashed; the log tells you <em>why</em>. Those are very different conversations.</p><p>If you’re staring at the same error right now — try this before nuking your install. It might save your project too. 🚀</p><p><em>Tags: XAMPP · MySQL · ibdata1 · PHP · CodeIgniter · Debugging · Local Development</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c5a298e8fbc0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why Your Angular App Feels Slow — The HTTP Request Mistake Almost Every Developer Makes ]]></title>
            <link>https://medium.com/@aniketadhav1997/why-your-angular-app-feels-slow-the-http-request-mistake-almost-every-developer-makes-d8b0dcbf5afc?source=rss-7d96b098b6cd------2</link>
            <guid isPermaLink="false">https://medium.com/p/d8b0dcbf5afc</guid>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[angular]]></category>
            <category><![CDATA[front-end-development]]></category>
            <category><![CDATA[performance]]></category>
            <category><![CDATA[ui]]></category>
            <dc:creator><![CDATA[Mr. Aniket Adhav]]></dc:creator>
            <pubDate>Mon, 11 May 2026 04:19:04 GMT</pubDate>
            <atom:updated>2026-05-11T04:19:04.683Z</atom:updated>
            <content:encoded><![CDATA[<p>Most Angular developers know how to call APIs.</p><p>But very few truly understand what happens <em>after</em> an HTTP request is sent.</p><p>This is one of the most ignored performance and stability issues in Angular applications.</p><p>Improper HTTP request handling leads to:</p><ul><li>Memory leaks</li><li>Duplicate API calls</li><li>Race conditions</li><li>Slow UI performance</li><li>Unnecessary backend load</li><li>Random UI bugs that are difficult to debug</li></ul><p>And the worst part?</p><p>Your app may appear to work correctly during development while silently creating problems in production.</p><p>In this article, we will deeply understand:</p><ul><li>How Angular HTTP requests actually work</li><li>Why requests remain active</li><li>When cancellation is required</li><li>The right RxJS operators to use</li><li>Common mistakes developers make</li><li>Real-world production patterns</li></ul><h3>The Most Common Angular HTTP Request Mistake</h3><p>Most developers write code like this:</p><pre>this.http.get(&#39;/api/users&#39;).subscribe(res =&gt; {<br>  console.log(res);<br>});</pre><p>Looks simple.</p><p>Looks correct.</p><p>But there is a hidden problem.</p><p>The subscription remains active until:</p><ul><li>The request completes</li><li>The observable completes</li><li>Or you manually unsubscribe</li></ul><p>Now imagine this inside:</p><ul><li>Search input</li><li>Route navigation</li><li>Auto-refresh dashboard</li><li>Live notifications</li><li>Infinite scroll</li><li>Component switching</li></ul><p>Things start breaking quickly.</p><h3>Understanding What Actually Happens</h3><p>Angular’s HttpClient returns an <strong>Observable</strong>.</p><pre>this.http.get()</pre><p>This does NOT immediately execute the request.</p><p>The request starts only when .subscribe() is called.</p><pre>.subscribe()</pre><p>Once subscribed:</p><ul><li>Browser sends the HTTP request</li><li>Observable stays active</li><li>Angular waits for response</li><li>Subscription lives in memory</li></ul><p>If the component is destroyed before response arrives, the request may still continue.</p><p>This becomes dangerous in large applications.</p><h3>Real Production Problem Example</h3><p>Suppose you are building a search feature.</p><pre>search(value: string) {<br>  this.http.get(`/api/search?q=${value}`)<br>    .subscribe(res =&gt; {<br>      this.results = res;<br>    });<br>}</pre><p>Now user types:</p><pre>A<br>An<br>Ang<br>Angu<br>Angul<br>Angular</pre><p>This creates SIX API requests instantly.</p><p>Problem:</p><ul><li>Older responses may arrive later</li><li>UI may show incorrect data</li><li>Backend receives unnecessary traffic</li><li>App becomes slower</li></ul><p>This is called a <strong>race condition</strong>.</p><h3>What Is a Race Condition?</h3><p>A race condition happens when:</p><ul><li>Multiple requests are running</li><li>Responses return in unpredictable order</li></ul><p>Example:</p><p>RequestResponse TimeAngular500msAng1000ms</p><p>Even though Angular was typed last,<br>Ang response arrives later and overrides the UI.</p><p>User sees incorrect results.</p><p>This is an extremely common bug.</p><h3>Solution 1: Manual Unsubscribe with takeUntil</h3><p>Professional Angular developers never leave subscriptions unmanaged.</p><p>Correct approach:</p><pre>private destroy$ = new Subject&lt;void&gt;();</pre><pre>ngOnInit() {<br>  this.http.get(&#39;/api/users&#39;)<br>    .pipe(<br>      takeUntil(this.destroy$)<br>    )<br>    .subscribe(res =&gt; {<br>      console.log(res);<br>    });<br>}</pre><pre>ngOnDestroy() {<br>  this.destroy$.next();<br>  this.destroy$.complete();<br>}</pre><h3>Why takeUntil Works</h3><p>takeUntil() listens to another observable.</p><p>When destroy$ emits:</p><ul><li>Subscription automatically unsubscribes</li><li>Request gets cancelled</li><li>Memory gets cleaned</li></ul><p>This pattern is widely used in enterprise Angular applications.</p><h3>But There’s Still a Better Solution</h3><p>For search APIs, auto-complete, and dynamic user input…</p><p>switchMap() is the real hero.</p><h3>Understanding switchMap()</h3><p>Example:</p><pre>searchControl.valueChanges.pipe(<br>  debounceTime(300),<br>  distinctUntilChanged(),<br>  switchMap(value =&gt;<br>    this.http.get(`/api/search?q=${value}`)<br>  )<br>).subscribe(res =&gt; {<br>  this.results = res;<br>});</pre><p>This single operator solves multiple problems.</p><h3>What switchMap() Actually Does</h3><p>Whenever a new value arrives:</p><ol><li>Previous request is cancelled</li><li>New request starts</li><li>Only latest response is used</li></ol><p>This prevents:</p><ul><li>API flooding</li><li>Race conditions</li><li>UI flickering</li><li>Outdated responses</li></ul><p>This is the industry-standard approach.</p><h3>Visual Understanding</h3><p>Without switchMap():</p><pre>Request 1 ---&gt; Running<br>Request 2 ---&gt; Running<br>Request 3 ---&gt; Running<br>Request 4 ---&gt; Running</pre><p>With switchMap():</p><pre>Request 1 ---&gt; Cancelled<br>Request 2 ---&gt; Cancelled<br>Request 3 ---&gt; Cancelled<br>Request 4 ---&gt; Active</pre><p>Only latest request survives.</p><p>Beautiful.</p><h3>Why Many Developers Still Use Nested Subscriptions</h3><p>Bad code:</p><pre>this.route.params.subscribe(params =&gt; {<br>  this.http.get(`/api/users/${params.id}`)<br>    .subscribe(res =&gt; {<br>      console.log(res);<br>    });<br>});</pre><p>Problems:</p><ul><li>Multiple subscriptions</li><li>Hard to manage</li><li>Memory leaks</li><li>Callback hell</li><li>Difficult debugging</li></ul><p>Professional solution:</p><pre>this.route.params.pipe(<br>  switchMap(params =&gt;<br>    this.http.get(`/api/users/${params.id}`)<br>  )<br>).subscribe(res =&gt; {<br>  console.log(res);<br>});</pre><p>Cleaner.<br>Safer.<br>Reactive.</p><h3>Important RxJS Operators Every Angular Developer Must Know</h3><h3>1. switchMap()</h3><p>Cancels previous observable.</p><p>Best for:</p><ul><li>Search</li><li>Typeahead</li><li>Dynamic APIs</li></ul><h3>2. mergeMap()</h3><p>Runs all requests simultaneously.</p><p>Best for:</p><ul><li>Parallel API calls</li><li>Batch operations</li></ul><h3>3. concatMap()</h3><p>Runs requests one by one in order.</p><p>Best for:</p><ul><li>Sequential operations</li><li>Ordered processing</li></ul><h3>4. exhaustMap()</h3><p>Ignores new requests until current finishes.</p><p>Best for:</p><ul><li>Login buttons</li><li>Payment submission</li><li>Preventing double-click actions</li></ul><h3>Another Hidden Problem: Async Pipe vs Manual Subscribe</h3><p>Many developers unnecessarily subscribe manually.</p><p>Instead of:</p><pre>users: any[] = [];</pre><pre>ngOnInit() {<br>  this.http.get(&#39;/api/users&#39;)<br>    .subscribe(res =&gt; {<br>      this.users = res;<br>    });<br>}</pre><p>Prefer:</p><pre>users$ = this.http.get(&#39;/api/users&#39;);</pre><p>HTML:</p><pre>&lt;div *ngFor=&quot;let user of users$ | async&quot;&gt;<br>  {{ user.name }}<br>&lt;/div&gt;</pre><p>Why?</p><p>Because Angular automatically:</p><ul><li>Subscribes</li><li>Unsubscribes</li><li>Cleans memory</li></ul><p>Less code.<br>Better architecture.</p><h3>Enterprise-Level Best Practices</h3><h3>Always Use Async Pipe When Possible</h3><p>Avoid manual subscriptions for UI rendering.</p><h3>Use switchMap for Search APIs</h3><p>Never use direct subscribe inside valueChanges.</p><h3>Use takeUntil for Long-Lived Streams</h3><p>Examples:</p><ul><li>WebSocket</li><li>Route params</li><li>Interval timers</li></ul><h3>Avoid Nested Subscriptions</h3><p>Flatten streams using:</p><ul><li>switchMap</li><li>mergeMap</li><li>concatMap</li></ul><h3>Debounce User Input</h3><p>Always combine:</p><ul><li>debounceTime()</li><li>distinctUntilChanged()</li></ul><p>This reduces backend load massively.</p><h3>Performance Impact in Real Applications</h3><p>Bad subscription handling can:</p><ul><li>Increase memory usage</li><li>Crash low-end devices</li><li>Slow Angular change detection</li><li>Create API bottlenecks</li><li>Increase cloud infrastructure cost</li></ul><p>Large enterprise apps take RxJS optimization very seriously.</p><h3>Final Thoughts</h3><p>Angular is not difficult.</p><p>Reactive programming is.</p><p>Most developers learn:</p><ul><li>Components</li><li>Services</li><li>Routing</li></ul><p>But ignore:</p><ul><li>RxJS internals</li><li>Observable lifecycle</li><li>Subscription cleanup</li></ul><p>That is where real Angular mastery begins.</p><p>The difference between:</p><ul><li>Beginner Angular developer<br>and</li><li>Senior Angular architect</li></ul><p>…is often how they handle streams, observables, and async operations.</p><p>Master RxJS.</p><p>And Angular becomes incredibly powerful.</p><h3>Key Takeaways</h3><p>✅ Cancel unnecessary HTTP requests<br>✅ Prevent memory leaks<br>✅ Avoid race conditions<br>✅ Use switchMap() for dynamic APIs<br>✅ Use takeUntil() for cleanup<br>✅ Prefer async pipe when possible<br>✅ Avoid nested subscriptions</p><p>Reactive programming is not optional in Angular.</p><p>It is the foundation of scalable Angular applications.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d8b0dcbf5afc" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Customize Ck Editor 5 in Angular Application. ]]></title>
            <link>https://medium.com/@aniketadhav1997/customize-ck-editor-5-in-angular-application-3b495779ee97?source=rss-7d96b098b6cd------2</link>
            <guid isPermaLink="false">https://medium.com/p/3b495779ee97</guid>
            <category><![CDATA[angular-ck5]]></category>
            <category><![CDATA[customize-ck]]></category>
            <category><![CDATA[base64-ck]]></category>
            <category><![CDATA[custom-ckeditor-5]]></category>
            <dc:creator><![CDATA[Mr. Aniket Adhav]]></dc:creator>
            <pubDate>Thu, 21 Dec 2023 19:04:14 GMT</pubDate>
            <atom:updated>2023-12-26T07:12:00.310Z</atom:updated>
            <content:encoded><![CDATA[<p>While implementing <strong>CKEditor</strong>, numerous challenges arise. However, a viable solution exists:</p><p>Although there isn’t current support for directly integrating CKEditor 5 from its source, you can craft a personalized CKEditor 5 build and seamlessly incorporate it into your Angular application.</p><p><strong>CKEditor 5 Online Builder | Create your own editor in 5 steps </strong>: open below link.</p><p>https://<a href="http://ckeditor.com/ckeditor-5/online-builder/">ckeditor.com/ckeditor-5/online-builder/</a></p><ol><li><strong>Choose Editor Type: </strong>which includes classic, Inline, Balloon, Balloon Block, Decoupled Document.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*q9qtWTJmSE6D-eUp1YpAFw.png" /><figcaption>Ck 5 Custome Builder.</figcaption></figure><p><strong>2. Now you need to select plugins: —</strong> once selection is done, follow next step.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Kczt2dDSK9sB1bxVFeSeEA.png" /><figcaption>Plugins</figcaption></figure><p>3. <strong>Now, adjust and pick toolbar items according to your requirement, just drag and drop. </strong>— follow next step.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OuEmtOeN5sNJD1mLi4800w.png" /></figure><p><strong>4. choose language: </strong>English preferred — follow next step.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kuktdswJxVlXR-SE8SyXsQ.png" /></figure><p><strong>5.</strong> <strong>Download build:</strong> hit start button.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*stsoUybFk4pwERxa_VoRNw.png" /></figure><p>Now Extract the downloaded zip and add in your project in parallel of node_modules folder, as presented below.</p><pre>├── ckeditor5<br>│   ├── build<br>│   ├── sample<br>│   ├── src<br>│   ├── ...<br>│   ├── package.json<br>│   └── webpack.config.js<br>├── node_modules<br>├── src<br>├── ...<br>└── package.json</pre><p>Then, add the package located in the ckeditor5 directory as a dependency of your project:</p><pre>npm install ./ckeditor5</pre><p>import custom build in<strong> App component</strong> or <strong>shared module</strong>, according to your structure.</p><pre>// app.component.ts<br><br>import { Component } from &#39;@angular/core&#39;;<br>import Editor from &#39;ckeditor5-custom-build/build/ckeditor&#39;;<br><br>@Component( {<br>  selector: &#39;app-root&#39;,<br>  templateUrl: &#39;./app.component.html&#39;,<br>  styleUrls: [&#39;./app.component.css&#39;]<br>} )<br>export class AppComponent {<br>  title = &#39;customEditor&#39;;<br>  public Editor = Editor;<br>}</pre><p><strong>OR</strong></p><p>you can also Customize Editor options in your component separately</p><pre>this.Editor.defaultConfig = {<br>      toolbar: {<br>        items: [<br>          &#39;bold&#39;,<br>          &#39;italic&#39;,<br>          &#39;underline&#39;,<br>          &#39;strikethrough&#39;,<br>          &#39;numberedList&#39;,<br>          &#39;insertTable&#39;,<br>          &#39;bulletedList&#39;,<br>          &#39;fileUpload&#39;,<br>          &#39;|&#39;,<br>          &#39;indent&#39;,<br>          &#39;outdent&#39;,<br>          &#39;fontBackgroundColor&#39;,<br>          &#39;fontColor&#39;,<br>          &#39;|&#39;,<br>          &#39;imageUpload&#39;,<br>          &#39;sourceEditing&#39;,<br>          &#39;Table&#39;,<br>          &#39;TableToolbar&#39;,<br>          &#39;TableProperties&#39;,<br>          &#39;TableCellProperties&#39;,<br>          &#39;tableColumn&#39;, <br>          &#39;tableRow&#39;, <br>          &#39;mergeTableCells&#39;,<br>        ],<br>      },<br>      image: {<br>        toolbar: [<br>          &#39;imageStyle:full&#39;,<br>          &#39;imageStyle:side&#39;,<br>          &#39;|&#39;,<br>          &#39;imageTextAlternative&#39;,<br>        ],<br>      },<br>      baseFloatZIndex: 10000001,<br>      heading: {<br>        options: [],<br>      },<br>      wordCount: {<br>        maxWordCount: -1,<br>        maxCharCount: 1000,<br>      },<br>    };</pre><p>Add model in your component as a work with [(ngModel)].</p><pre>@Component( {<br>    // ...<br>} )<br>export class MyComponent {<br>    public model = {<br>        editorData: &#39;&lt;p&gt;Hello, world!&lt;/p&gt;&#39;<br>    };<br>    // ...<br>}</pre><p>Use the model in the template to enable a two–way data binding:</p><pre>&lt;ckeditor [(ngModel)]=&quot;model.editorData&quot; [editor]=&quot;Editor&quot;&gt;&lt;/ckeditor&gt;</pre><p>Rerun the project and <strong>All Set</strong>.</p><p>Source-</p><ol><li><a href="https://ckeditor.com/ckeditor-5/online-builder/">CKEditor 5 Online Builder | Create your own editor in 5 steps</a></li><li><a href="https://ckeditor.com/docs/ckeditor5/latest/installation/integrations/angular.html">https://ckeditor.com/docs/ckeditor5/latest/installation/integrations/angular.html</a></li></ol><p><em>Thanks for reading this article.</em></p><p><em>Don’t forget to clap.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3b495779ee97" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>