<?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 M on Medium]]></title>
        <description><![CDATA[Stories by M on Medium]]></description>
        <link>https://medium.com/@eng.mazen.embaby_6848?source=rss-3ed84c08c9a8------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*dmbNkD5D-u45r44go_cf0g.png</url>
            <title>Stories by M on Medium</title>
            <link>https://medium.com/@eng.mazen.embaby_6848?source=rss-3ed84c08c9a8------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 20 Nov 2026 22:46:02 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@eng.mazen.embaby_6848/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[“How to Add Toast Notifications in Angular with ngx-toastr-notidier”]]></title>
            <link>https://medium.com/@eng.mazen.embaby_6848/how-to-add-toast-notifications-in-angular-with-ngx-toastr-notidier-50372efe5689?source=rss-3ed84c08c9a8------2</link>
            <guid isPermaLink="false">https://medium.com/p/50372efe5689</guid>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[angular]]></category>
            <category><![CDATA[ngx-toastr]]></category>
            <category><![CDATA[toast-notifications]]></category>
            <category><![CDATA[angular-toast]]></category>
            <dc:creator><![CDATA[M]]></dc:creator>
            <pubDate>Wed, 02 Jul 2025 13:46:51 GMT</pubDate>
            <atom:updated>2025-07-23T04:02:42.756Z</atom:updated>
            <content:encoded><![CDATA[<h3>“How to Add Toast Notifications in Angular 20 with ngx-toastr-notifier”</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/374/0*r-SC9YflSXbnJGgR" /><figcaption>success toastr</figcaption></figure><h3>🚀 Supercharge Angular Notifications with ngx-toastr-notifier</h3><p>If you’re looking for a modern and flexible toast notification system for your Angular app, look no further than <a href="https://www.npmjs.com/package/ngx-toastr-notifier">ngx-toastr-notifier</a>. Lightweight, customizable, and dead simple to use — this library is a drop-in solution for showing elegant, animated toast messages in your UI.</p><p>In this article, I’ll show you how to:</p><ul><li>🔧 Set up ngx-toastr-notifier in your Angular project</li><li>🛠 Customize your toasts (styles, duration, etc.)</li><li>💬 Use it for real-time user feedback</li></ul><p>Let’s get started.</p><h3>📦 Step 1: Installation</h3><p>Install the package via npm:</p><pre>npm install ngx-toastr-notifier</pre><h3>🚨 Step 2: Show Toasts in Your Components</h3><p>Inject the ToastService and call its show() method:</p><pre>import { Component } from &#39;@angular/core&#39;;<br>import { ToastService } from &#39;ngx-toastr-notifier&#39;;<br><br>@Component({<br>  selector: &#39;app-demo&#39;,<br>  template: `&lt;button (click)=&quot;showToast()&quot;&gt;Show Toast&lt;/button&gt;`<br>})<br>export class DemoComponent {<br>  constructor(private toastr: ToastService) {}<br><br>  showToast() {<br>    this.toastr.show(&#39;success&#39;, &#39;This is a toast message!&#39;, &#39;Toast&#39;);<br>  }<br>}</pre><h3>🎨 Toast Types</h3><p>You can choose from:</p><ul><li>success</li><li>error</li><li>info</li><li>warning</li></ul><h3>🧰 Additional Options</h3><p>Here’s what you can customize when calling show():</p><pre>| Option     | Type    | Description                                                                   |<br>|------------|---------|-------------------------------------------------------------------------------|<br>| `type`               | ToastType                     | success, error, info, warning                 |<br>| `duration`           | number                        | How long the toast stays (in milliseconds)    |<br>| `showClose`          | boolean                       | The close button to be appeared or not        |<br>| `progressBar`        | boolean                       | The progress bar to be appeared or not        |<br>| `horizontalPosition` | MatSnackBarHorizontalPosition | The horizontal position left, center, right   |<br>| `verticalPosition`   | MatSnackBarVerticalPosition   | The vertical postition top, center, bottom    |<br>| `Direction`          | Direction                     | Text layout direction ltr, rtl                |</pre><p>Example:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/347/1*02f5l3QY7TKB6DTQR_QmDg.png" /></figure><pre>import { Component } from &#39;@angular/core&#39;;<br>import { ToastService } from &#39;ngx-toastr-notifier&#39;;<br><br>@Component({<br>  selector: &#39;app-demo&#39;,<br>  template: `&lt;button (click)=&quot;showToast()&quot;&gt;Show Toast&lt;/button&gt;`<br>})<br>export class DemoComponent {<br>  constructor(private toastr: ToastService) {}<br><br>  showToast() {<br>    this.toastr.info(&#39;We are open today from 10 to 22&#39;, &#39;Information&#39; {<br>      duration: 5000,           // Duration in milliseconds<br>      showClose: true,         // Hide the close button<br>      horizontalPosition: &#39;center&#39; // Position toast to the center<br>    });<br>  }<br>}<br></pre><h3>🎯 Use Cases</h3><p>Use toast notifications to:</p><ul><li>Confirm user actions (Profile updated)</li><li>Report errors (Server unreachable)</li><li>Share tips (Tip: Use keyboard shortcuts!)</li><li>Celebrate events (🎉 Welcome back!)</li></ul><h3>✅ Summary</h3><p>With ngx-toastr-notifier, Angular notifications are no longer an afterthought. They&#39;re quick, flexible, and easy to integrate into any application — no boilerplate, no bloat.</p><h3>Why developers love it:</h3><p>✅ Simple API<br> ✅ Lightweight and fast<br> ✅ Angular animations built-in<br> ✅ Fully customizable look and feel</p><p><a href="https://stackblitz.com/~/github.com/Mazen-Embaby/ngx-toastr-angular">StackBlitz</a></p><p>Wish you the best<br>Mazen E.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=50372efe5689" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>