<?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 Pramod Pudale on Medium]]></title>
        <description><![CDATA[Stories by Pramod Pudale on Medium]]></description>
        <link>https://medium.com/@pudalepramod?source=rss-fbd5d65dc98f------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*fDIhUOBDwZAe8aKf.</url>
            <title>Stories by Pramod Pudale on Medium</title>
            <link>https://medium.com/@pudalepramod?source=rss-fbd5d65dc98f------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 09:36:49 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@pudalepramod/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[Mastering Chakra UI: Supercharge Your React App Development]]></title>
            <link>https://medium.com/@pudalepramod/mastering-chakra-ui-supercharge-your-react-app-development-825509813d68?source=rss-fbd5d65dc98f------2</link>
            <guid isPermaLink="false">https://medium.com/p/825509813d68</guid>
            <dc:creator><![CDATA[Pramod Pudale]]></dc:creator>
            <pubDate>Fri, 08 Sep 2023 13:10:09 GMT</pubDate>
            <atom:updated>2023-09-13T10:38:24.355Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Chakra UI</strong> has gained popularity in the <strong><em>React.js</em></strong> community for its <em>developer-friendly approach</em> and focus on accessibility. It is suitable for a wide range of web applications, from simple projects to <em>complex, enterprise-level applications.</em> If you are working with React.js and want to streamline your UI development process while ensuring accessibility, Chakra UI is worth considering.</p><p><strong>Here are some key features and information about the Chakra UI library:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/819/1*vtHYSGOyiGK0nxySbhRQPQ.png" /></figure><ol><li><strong>Accessibility-First Design:</strong> <br>Chakra UI prioritizes accessibility by default. It provides accessible and keyboard-friendly components out of the box, helping developers create web applications that are usable by individuals with disabilities.</li><li><strong>Component-Based Architecture:</strong> <br>Chakra UI is built on a component-based architecture, making it easy to create and reuse UI components in your React applications. This component-driven approach promotes code modularity and reusability.</li><li><strong>Customizable:</strong> <br>Chakra UI is highly customizable. It offers a theming system that allows you to define your own design tokens, such as colors, typography, and spacing, to match your project&#39;s branding and design requirements.</li><li><strong>Responsive Design:</strong> <br>Chakra UI includes responsive design features. It provides responsive styles and breakpoints for creating layouts that adapt to different screen sizes and devices.</li><li><strong>Utility-First CSS:</strong> <br>Chakra UI uses utility-first CSS, which allows you to apply styles to components using simple class names. This approach makes it easy to style and modify components without writing extensive custom CSS.</li><li><strong>Variants and Styles:</strong> <br>Chakra UI components come with predefined variants and styles to cover common use cases. You can also customize these variants or create your own to suit your project&#39;s needs.</li><li><strong>Icon Library:</strong> <br>Chakra UI includes a collection of commonly used icons, making it convenient to add icons to your UI components without relying on additional icon libraries.</li><li><strong>Form and Input Components:</strong> <br>The library provides a set of form and input components, including checkboxes, radio buttons, text fields, and more, with built-in validation support.</li><li><strong>Community-Driven:</strong> <br>Chakra UI has a strong community of users and contributors. It is actively maintained and receives updates and enhancements regularly.</li><li><strong>React Native Support: <br></strong>In addition to web development, Chakra UI has experimental support for React Native, allowing you to use Chakra components in mobile app development.</li><li><strong>Official Documentation:</strong> <br>Chakra UI offers comprehensive documentation with examples, usage guides, and API references, making it easy for developers to get started and learn how to use the library effectively.</li><li><strong>Theming and Dark Mode:</strong> <br>Chakra UI&#39;s theming system makes it straightforward to implement dark mode and switch between different themes in your application.</li></ol><p><a href="https://chakra-ui.com/">Chakra UI link</a><br><a href="https://chakra-ui.com/">https://chakra-ui.com/</a></p><p>Sidebar using Chakra UI — <a href="https://stackblitz.com/edit/react-4slwm1?file=src%2FApp.js">stackblitz</a><br><a href="https://stackblitz.com/edit/react-4slwm1?file=src%2FApp.js">https://stackblitz.com/edit/react-4slwm1?file=src%2FApp.js</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=825509813d68" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Angular Compilation]]></title>
            <link>https://medium.com/@pudalepramod/angular-compilation-90c556b6e7c7?source=rss-fbd5d65dc98f------2</link>
            <guid isPermaLink="false">https://medium.com/p/90c556b6e7c7</guid>
            <category><![CDATA[angular12]]></category>
            <category><![CDATA[angular-cli]]></category>
            <category><![CDATA[angular]]></category>
            <category><![CDATA[javascriptcore]]></category>
            <category><![CDATA[angular-framework]]></category>
            <dc:creator><![CDATA[Pramod Pudale]]></dc:creator>
            <pubDate>Mon, 28 Aug 2023 10:47:10 GMT</pubDate>
            <atom:updated>2023-08-28T10:47:10.300Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pK_tmNd0oH1yhuTBg70H7A.jpeg" /></figure><p>The Angular compiler stands as a pivotal component within the Angular framework, tasked with converting Angular templates and code into functional JavaScript code that browsers can execute. Operating as a potent instrument, it undertakes a range of optimizations and conversions aimed at bolstering the performance and capabilities of Angular applications. Delve into the following inclusive details concerning the Angular compiler</p><ol><li><strong>Role of the Compiler:<br></strong>The Angular compiler is responsible for converting Angular templates written in HTML and Angular-specific syntax into JavaScript code.<br>It compiles components, directives, pipes, and other Angular-specific constructs into browser-compatible code.</li><li><strong>Ahead-of-Time (AOT) vs. Just-in-Time (JIT) Compilation:<br></strong>Angular supports two compilation modes: <strong><em>AOT and JIT.</em></strong><br>AOT compilation is performed during the build process, resulting in <em>smaller bundle sizes and faster</em> application startup. It helps catch template-related errors early.<br>JIT compilation happens at runtime and is suitable for development environments. It allows for faster development cycles but results in larger bundles.</li><li><strong>Template Compilation:<br></strong>The compiler parses Angular templates and converts them into a combination of <em>JavaScript classes and functions.</em><br>Template expressions and bindings are transformed into executable JavaScript code that updates the view when data changes.</li><li><strong>Template Parsing and Metadata Generation:</strong><br>The compiler parses templates to extract information about components, directives, and their metadata.<br>It generates metadata that defines how components and other Angular constructs should be instantiated and interact with the rest of the application.</li><li><strong>Change Detection and Optimization:<br></strong>The compiler optimizes change detection by analyzing templates and generating code that minimizes the number of checks needed to detect changes in the application’s state.<br>This optimization contributes to <em>improved performance, as change detection</em> can be a resource-intensive operation.</li><li><strong>Dependency Injection:</strong><br>The compiler plays a role in handling dependency injection, a fundamental concept in Angular.<br>It generates code to ensure that services and <em>dependencies are injected into components</em> and other parts of the application correctly.</li><li><strong>View Encapsulation:<br></strong>The compiler handles view encapsulation, a technique used to scope CSS styles to a specific component’s view.<br>It generates CSS encapsulation rules to prevent styles from affecting other components’ views.</li><li><strong>Code Minification and Tree Shaking:<br></strong>The AOT compiler performs code <em>minification and tree shaking </em>during the build process.<br>Minification reduces the size of the generated JavaScript code by <em>removing whitespace and renaming variables.</em><br>Tree shaking eliminates unused code from the final bundle, further <em>reducing the application’s size.</em></li><li><strong>Internationalization (i18n):<br></strong>The compiler supports internationalization by providing tools to extract and translate strings used in templates.<br>It generates necessary code for handling translated strings and displaying the correct language based on the user’s preferences.</li><li><strong>Debugging and Tooling:<br></strong>The Angular compiler provides tools and diagnostics to help developers identify issues in templates and other parts of the application.<br>Compiler-related errors and warnings guide developers to fix template syntax or other issues.</li></ol><p><em>#AngularFramework #AngularCompiler #JavaScriptCode #WebDevelopment #FrontendOptimization #AngularApplications #MediumBlogs</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=90c556b6e7c7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Commonly used RxJS features with Reactive Forms]]></title>
            <link>https://medium.com/@pudalepramod/commonly-used-rxjs-features-with-reactive-forms-3e072b14a9f4?source=rss-fbd5d65dc98f------2</link>
            <guid isPermaLink="false">https://medium.com/p/3e072b14a9f4</guid>
            <dc:creator><![CDATA[Pramod Pudale]]></dc:creator>
            <pubDate>Mon, 29 May 2023 13:51:56 GMT</pubDate>
            <atom:updated>2023-05-30T05:01:50.160Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zLKBBboX-ClNmZMgUxd4MA.jpeg" /></figure><ol><li><strong>ValueChanges: <br></strong>The valueChanges property of a form control or form group returns an observable that emits the current value of the form control or form group whenever it changes.</li><li><strong>DebounceTime:<br></strong>The debounceTime operator delays the emission of values from an observable by a specified amount of time. It is often used with valueChanges to debounce user input and reduce unnecessary API calls or validation checks.</li><li><strong>DistinctUntilChanged:<br></strong>The distinctUntilChanged operator filters out consecutive duplicate values emitted by an observable. It is useful when you want to prevent duplicate values from triggering unnecessary actions or updates.</li></ol><pre>import { Component } from &#39;@angular/core&#39;;<br>import { FormControl } from &#39;@angular/forms&#39;;<br>import { debounceTime, distinctUntilChanged } from &#39;rxjs/operators&#39;;<br><br>@Component({<br>  selector: &#39;app-search&#39;,<br>  template: `<br>    &lt;input type=&quot;text&quot; [formControl]=&quot;searchControl&quot; placeholder=&quot;Search&quot;&gt;<br>  `<br>})<br>export class SearchComponent {<br>  searchControl = new FormControl(&#39;&#39;);<br><br>  constructor() {<br>    this.searchControl.valueChanges<br>      .pipe(<br>        debounceTime(300),<br>        distinctUntilChanged()<br>      )<br>      .subscribe(searchTerm =&gt; {<br>        // Perform desired action or API call with the debounced and distinct search term<br>        console.log(searchTerm);<br>      });<br>  }<br>}</pre><p>4. <strong>SwitchMap:<br></strong>The switchMap operator is used for scenarios where you need to cancel previous inner observables and switch to a new observable when the source observable emits a new value. It is commonly used for making API calls based on user input.</p><pre>@Component({<br>  selector: &#39;app-search&#39;,<br>  template: `<br>    &lt;input type=&quot;text&quot; [formControl]=&quot;searchControl&quot; placeholder=&quot;Search&quot;&gt;<br>  `<br>})<br>export class SearchComponent {<br>  searchControl = new FormControl(&#39;&#39;);<br><br>  constructor(private http: HttpClient) {<br>    this.searchControl.valueChanges<br>      .pipe(<br>        debounceTime(300),<br>        distinctUntilChanged(),<br>        switchMap(searchTerm =&gt; this.getSearchResults(searchTerm))<br>      )<br>      .subscribe(results =&gt; {<br>        // Handle the search results<br>        console.log(results);<br>      });<br>  }<br><br>  getSearchResults(searchTerm: string) {<br>    return this.http.get&lt;any[]&gt;(&#39;api/search&#39;, { params: { query: searchTerm } });<br>  }<br>}</pre><p>5. <strong>Merge:<br></strong>The merge operator is used to combine multiple Observables into a single stream. It can be useful when you need to react to changes from multiple form controls simultaneously. For example, you might have two form fields where the validity of one depends on the value of the other. By merging the valueChanges Observables of both fields, you can perform validation or update dependent fields whenever either of them changes.</p><pre>import { Component } from &#39;@angular/core&#39;;<br>import { FormGroup, FormControl } from &#39;@angular/forms&#39;;<br>import { merge } from &#39;rxjs&#39;;<br><br>@Component({<br>  selector: &#39;app-merge-example&#39;,<br>  template: `<br>    &lt;form [formGroup]=&quot;myForm&quot;&gt;<br>      &lt;input formControlName=&quot;firstName&quot; placeholder=&quot;First Name&quot;&gt;<br>      &lt;input formControlName=&quot;lastName&quot; placeholder=&quot;Last Name&quot;&gt;<br>      &lt;button [disabled]=&quot;myForm.invalid&quot;&gt;Submit&lt;/button&gt;<br>    &lt;/form&gt;<br>  `,<br>})<br>export class MergeExampleComponent {<br>  myForm: FormGroup;<br><br>  constructor() {<br>    this.myForm = new FormGroup({<br>      firstName: new FormControl(&#39;&#39;),<br>      lastName: new FormControl(&#39;&#39;),<br>    });<br><br>    merge(<br>      this.myForm.get(&#39;firstName&#39;).valueChanges,<br>      this.myForm.get(&#39;lastName&#39;).valueChanges<br>    ).subscribe(() =&gt; {<br>      console.log(&#39;Form value changed!&#39;);<br>      // Perform validation or update dependent fields here<br>    });<br>  }<br>}</pre><p>6. C<strong>atch Error</strong>: <br>The catchError operator is used for error handling in reactive scenarios. When performing asynchronous operations like submitting a form or making API requests, you can use catchError to gracefully handle any errors that occur during these operations. This allows you to display appropriate error messages or trigger alternative actions in case of failures.</p><pre>import { Component } from &#39;@angular/core&#39;;<br>import { FormGroup, FormControl } from &#39;@angular/forms&#39;;<br>import { catchError } from &#39;rxjs/operators&#39;;<br>import { throwError } from &#39;rxjs&#39;;<br><br>@Component({<br>  selector: &#39;app-catch-error-example&#39;,<br>  template: `<br>    &lt;form [formGroup]=&quot;myForm&quot;&gt;<br>      &lt;input formControlName=&quot;username&quot; placeholder=&quot;Username&quot;&gt;<br>      &lt;button (click)=&quot;submitForm()&quot;&gt;Submit&lt;/button&gt;<br>    &lt;/form&gt;<br>    &lt;p *ngIf=&quot;errorMessage&quot;&gt;{{ errorMessage }}&lt;/p&gt;<br>  `,<br>})<br>export class CatchErrorExampleComponent {<br>  myForm: FormGroup;<br>  errorMessage: string;<br><br>  constructor() {<br>    this.myForm = new FormGroup({<br>      username: new FormControl(&#39;&#39;),<br>    });<br>  }<br><br>  submitForm() {<br>    const username = this.myForm.get(&#39;username&#39;).value;<br><br>    // Simulating an API request that might fail<br>    performApiRequest(username).pipe(<br>      catchError((error) =&gt; {<br>        this.errorMessage = &#39;An error occurred. Please try again.&#39;;<br>        return throwError(error);<br>      })<br>    ).subscribe((response) =&gt; {<br>      // Handle successful response here<br>      console.log(&#39;API response:&#39;, response);<br>    });<br>  }<br>}<br><br>function performApiRequest(username: string) {<br>  // Simulating an API request that might fail<br>  if (username === &#39;admin&#39;) {<br>    return throwError(&#39;Invalid username&#39;);<br>  } else {<br>    return of(&#39;Success&#39;);<br>  }<br>}</pre><p>7. <strong>Combine Latest<br></strong>The combineLatest operator combines the latest values from multiple Observables into a new Observable. This is useful when you want to react to changes in multiple form controls simultaneously. For example, you might need to enable or disable a form button based on the validity of multiple fields. By using combineLatest, you can monitor the validity of all relevant form controls and update the button state accordingly.</p><pre>import { Component } from &#39;@angular/core&#39;;<br>import { FormGroup, FormControl } from &#39;@angular/forms&#39;;<br>import { combineLatest } from &#39;rxjs&#39;;<br><br>@Component({<br>  selector: &#39;app-combine-latest-example&#39;,<br>  template: `<br>    &lt;form [formGroup]=&quot;myForm&quot;&gt;<br>      &lt;input formControlName=&quot;firstName&quot; placeholder=&quot;First Name&quot;&gt;<br>      &lt;input formControlName=&quot;lastName&quot; placeholder=&quot;Last Name&quot;&gt;<br>      &lt;p&gt;Full Name: {{ fullName }}&lt;/p&gt;<br>    &lt;/form&gt;<br>  `,<br>})<br>export class CombineLatestExampleComponent {<br>  myForm: FormGroup;<br>  fullName: string;<br><br>  constructor() {<br>    this.myForm = new FormGroup({<br>      firstName: new FormControl(&#39;&#39;),<br>      lastName: new FormControl(&#39;&#39;),<br>    });<br><br>    combineLatest([<br>      this.myForm.get(&#39;firstName&#39;).valueChanges,<br>      this.myForm.get(&#39;lastName&#39;).valueChanges<br>    ]).subscribe(([firstName, lastName]) =&gt; {<br>      this.fullName = firstName + &#39; &#39; + lastName;<br>    });<br>  }<br>}</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3e072b14a9f4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ANGULAR CODING STANDARDS]]></title>
            <link>https://medium.com/@pudalepramod/angular-coding-standards-1a3e1e0acf8d?source=rss-fbd5d65dc98f------2</link>
            <guid isPermaLink="false">https://medium.com/p/1a3e1e0acf8d</guid>
            <category><![CDATA[clean-code]]></category>
            <category><![CDATA[angular-coding-standard]]></category>
            <category><![CDATA[angular-optimization]]></category>
            <category><![CDATA[angular-cli]]></category>
            <category><![CDATA[angular]]></category>
            <dc:creator><![CDATA[Pramod Pudale]]></dc:creator>
            <pubDate>Tue, 31 Jan 2023 10:53:12 GMT</pubDate>
            <atom:updated>2023-02-21T09:02:37.105Z</atom:updated>
            <content:encoded><![CDATA[<h3>Best Practices in Angular</h3><p><strong>1. Use Pure Pipes: </strong><br>In this way any inputs passing through these Pipe is computed only once and cached, next calls with the same inputs will be skipped and returned the cached data.</p><pre>import { Pipe, PipeTransform } from &#39;@angular/core&#39;;<br>@Pipe({<br>  name: &#39;safe&#39;,<br>  pure: true <br>})<br>export class SafePipe implements PipeTransform {<br>  public transform(value: any, type: string){<br>    retrurn //your logic<br>  }<br>}</pre><p><strong>2. Use pipe when rendering content in ngFor</strong></p><pre>// Slower<br> {{ render(row, column) }}<br><br>render(row: any, column: string) {<br> return YourService.render(row, column);<br>}<br><br>// Faster<br> {{ row | render:column }}<br><br>@Pipe({<br> name: &#39;render&#39;,<br>})<br>export class RenderPipe implements PipeTransform {<br> transform(row: any, column: string) {<br>//return logic<br> }<br>}</pre><p><strong>3. Use trackBy<br></strong>When an array changes, Angular re-renders the whole DOM tree. But if you use trackBy, Angular will know which element has changed and will only make DOM changes for that particular element.</p><pre>// in the html <br><br>&lt;li *ngFor=&quot;let item of items; trackBy: trackByFn&quot;&gt;{{ item }}&lt;/li&gt;<br><br>// in the component<br><br>trackByFn(index, item) {    <br>   return item.id; // unique id corresponding to the item if id is not availabel then return index<br>}</pre><p>4. <strong>Avoid Naming Collisions:<br> Camel case</strong> for variables and methods.<br> <strong>Pascal case</strong> for types and classes in JavaScript.<br> <strong>Upper case</strong> snake case for constants.</p><p><strong>5. Use of Lazy Loading<br></strong> Lazy Loading is a built-in feature that allows Javascript to load the component asynchronously whenever that particular route hits. it divides the entire app into various bundles to manage its speed.</p><pre>const routing: Routes = [<br>     {<br>      path: &#39;dashboard&#39;,<br>       loadChildren: () =&gt; import(&#39;./admin/dashboard.module&#39;).<br>               then(d =&gt; d.DashboardModule)<br>        }<br>     ];</pre><p><strong>6. Clean up subscriptions<br></strong>To prevent these memory leaks we have to unsubscribe from the subscriptions. When subscribing to observables, always make sure you unsubscribe from them appropriately by using operators. (take, takeUntil, etc.)</p><pre>private _destroyed = new Subject();<br><br>public ngOnInit (): void {<br>    testObservable<br>    .pipe(<br>       map(value =&gt; value.info)<br>       takeUntil(this._destroyed)<br>     )<br>    .subscribe(res =&gt; {<br>    // data processing<br>});<br>}<br><br>public ngOnDestroy (): void {<br>    this._destroyed.next();<br>    this._destroyed.complete();<br>}</pre><p><strong>7. Avoid any<br></strong>Declare constants or variables with proper data type or use proper interface. When declaring variables in Typescript without a typing, the typing of the variable will be deduced by the value that gets assigned to it.</p><pre>const a: number = 1;<br>const b: number = &#39;hello&#39;;<br>const c: number = a + b;<br><br>// compilation error<br>Type &#39;&quot;hello&quot;&#39; is not assignable to type &#39;number&#39;.<br><br>const b:number</pre><p><strong>8. Define small functions<br></strong>Long methods are hard to read, understand and maintain. Always write short and meaning full code alos use proper comments for reference.<br>We can extract those methods into their own method and make them do one thing each and use them instead. [Limit files to 400 Lines of code.- Define small functions and limit them to no more than 75 lines.]</p><p><strong>9. Avoid logic in templates<br></strong>Having logic in the template means that it is not possible to unit test it and therefore it is more prone to bugs when changing template code.</p><pre>// template<br>&lt;p *ngIf=&quot;role===&#39;developer&#39;&quot;&gt; Status: Developer &lt;/p&gt;<br><br>// component<br>public ngOnInit (): void {<br>    this.role = &#39;developer&#39;;<br>}<br><br>// template<br>&lt;p *ngIf=&quot;role===&#39;developer&#39;&quot;&gt; Status: Developer &lt;/p&gt;<br><br>// component<br>public ngOnInit (): void {<br>    this.role = &#39;developer&#39;;<br>}</pre><p><strong>10. Declare safe strings<br></strong>The variable of type string has only some set of values and we can declare the list of possible values as the type. So the variable will accept only the possible values. We can avoid bugs while writing the code during compile time itself.</p><pre>private vehicleType: string;<br>// We can assign any string to vehicleType.<br>this.vehicleType = &#39;four wheeler&#39;;<br>this.vehicleType = &#39;two wheeler&#39;;<br>this.vehicleType = &#39;car&#39;;</pre><p>Safe string declaration</p><pre>private vehicleType: &#39;four wheeler&#39; | &#39;two wheeler&#39;;<br>this.vehicleType = &#39;four wheeler&#39;;<br>this.vehicleType = &#39;two wheeler&#39;;<br><br>this.vehicleType = &#39;car&#39;; // This will give the below error<br><br>Type &#39;&quot;car&quot;&#39; is not assignable to type &#39;&quot;four wheeler&quot; | &quot;two wheeler&quot;&#39;</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1a3e1e0acf8d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[CUSTOM CONFIRMATION DIALOG IN ANGULAR]]></title>
            <link>https://medium.com/@pudalepramod/custom-global-confirmation-dialog-in-angular-using-service-79633a16c6e8?source=rss-fbd5d65dc98f------2</link>
            <guid isPermaLink="false">https://medium.com/p/79633a16c6e8</guid>
            <category><![CDATA[angular]]></category>
            <category><![CDATA[commondataenvironment]]></category>
            <category><![CDATA[typescrip]]></category>
            <category><![CDATA[popups]]></category>
            <category><![CDATA[angular-services]]></category>
            <dc:creator><![CDATA[Pramod Pudale]]></dc:creator>
            <pubDate>Mon, 30 Jan 2023 04:09:10 GMT</pubDate>
            <atom:updated>2023-02-21T04:21:55.311Z</atom:updated>
            <content:encoded><![CDATA[<p>We are implementing a common confirmation dialog in angular application. The duty of confirmation dialog is to show content to the end user with a confirmation buttons. Dialog will return a single Boolean value. There are multiple libraries for confirmation dialog libraries available (Sweet alert, popup…)</p><p><strong>WHY?</strong></p><ul><li>Customization is possible as per project requirement.</li><li>It will Improve app performance. Third party libraries are a bit heavy which will be impacted on app performance.</li></ul><p><strong>Step 1:</strong> Created Dialog component (ng g c confirmationDialog)</p><p><strong>Step 2:</strong> Create global service for Dialog ( ng g service confirmationDialog) and create method to open/close dialog component</p><pre>@Injectable({<br>  providedIn: &#39;root&#39;<br>})<br>export class confirmationDialogService {<br><br>  constructor(public dialog: MatDialog, public configService: ConfigService) {<br>  }<br><br>  openConfirmationDialog(confirmationAlertData?: ConfirmationCommonDialogData) {<br>    return new Promise((resolve, reject) =&gt; {<br>      const matDialogConfig: MatDialogConfig = {<br>        width: confirmationAlertData &amp;&amp; confirmationAlertData.width ? confirmationAlertData.width : COMMON.DELETE_ALERT_WIDTH,<br>        height: confirmationAlertData &amp;&amp; confirmationAlertData.height ? confirmationAlertData.height : &quot;auto&quot;,<br>        data: confirmationAlertData,<br>        panelClass: [<br>          &#39;animated&#39;,<br>          &#39;slideInDown&#39;<br>        ],<br>      };<br><br>      const dialogRef = this.dialog.open(CommonConfirmationDialogComponent, matDialogConfig);<br>      dialogRef.afterClosed().subscribe(result =&gt; {<br>        resolve(result ? true : false);<br>      });<br>    })<br>  }<br>}</pre><p><strong>Step 3: </strong>Add Interface for Dialog Service</p><pre>export interface ConfirmationCommonDialogData {<br>  title?: string; //confirmation dialog title<br>  titleTooltip?: string; //tooltip for title if needed<br>  icon?: string; //dialog icon<br>  message?: string; // confirmation dialog subtitle<br>  cancelButtonText?: string; //cancel button text<br>  submitButtonText?: string; //submit button text<br>  type?:string; //confirmation, info<br>  isInfoActionable?:boolean; //on hover list show info dialog<br>  data?: dialogData[]; //processed data for showing custom info ...etc<br>  submitButtonStatus?:boolean; //hide/show submit button<br>  cancelButtonStatus?:boolean; //hide/show cancel button<br>  width?:string; //popup width<br>  height?:string; //popup width<br>}</pre><p><strong>Step 4:</strong> Use dialog service from any component</p><pre>  constructor(<br>  public confirmationDialog: confirmationDialogService<br>  ) <br>    <br>  //open default dialog <br>    const isDelete = await this.confirmationDialog.openConfirmationDialog();<br>    if(isDelete){<br>    //Your Logic<br>}<br><br><br>//this is custom dialog you can add fields as per dialog interface<br>const alertCommonDialogData:ConfirmationCommonDialogData = {<br>      message: &quot;You are about to delete ...&quot;<br>    }<br>    const isDelete = await this.confirmationDialog.openConfirmationDialog(alertCommonDialogData);<br>    if(isDelete){<br>    //Your Logic<br>}</pre><p><strong>Step 5:</strong> Add below code in dialog component</p><pre>export class CommonConfirmationDialogComponent implements OnInit {<br><br>  constructor(public dialogRef: MatDialogRef&lt;CommonConfirmationDialogComponent&gt;,<br>    @Inject(MAT_DIALOG_DATA) public confirmCommonDialogData: ConfirmationCommonDialogData,<br><br>  ) {<br>    //set confirmation dialog input parameters<br>    this.confirmCommonDialogData.title = this.confirmCommonDialogData.title ? this.confirmCommonDialogData.title : COMMON.DELETE_DIALOG_TITLE;<br>    this.confirmCommonDialogData.type = this.confirmCommonDialogData.type ? this.confirmCommonDialogData.type : COMMON.CONFIRMATION_DIALOG_TYPE.DELETE_WITH_LIST;<br>    this.confirmCommonDialogData.message = this.confirmCommonDialogData.message ? this.confirmCommonDialogData.message : COMMON.DELETE_DIALOG_CONTENT;<br>    this.confirmCommonDialogData.submitButtonText = this.confirmCommonDialogData.submitButtonText ? this.confirmCommonDialogData.submitButtonText : COMMON.DIALOG_CONFIRM;<br>    this.confirmCommonDialogData.cancelButtonText = this.confirmCommonDialogData.cancelButtonText ? this.confirmCommonDialogData.cancelButtonText : COMMON.DIALOG_CANCEL;<br>    this.confirmCommonDialogData.submitButtonStatus = this.confirmCommonDialogData.submitButtonStatus === false ? this.confirmCommonDialogData.submitButtonStatus : true;<br>    this.confirmCommonDialogData.cancelButtonStatus = this.confirmCommonDialogData.cancelButtonStatus === false ? false : true;<br>    this.confirmCommonDialogData.titleTooltip = this.confirmCommonDialogData.titleTooltip ? this.confirmCommonDialogData.titleTooltip : &#39;&#39;;<br>}<br>  <br>  ngOnInit() {<br>  }</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/738/1*XBNd7FY5XxBEFdxgp2lDpw.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=79633a16c6e8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[I need help for WordPress Plugin for Online course Scheduling]]></title>
            <link>https://medium.com/@pudalepramod/i-need-help-for-wordpress-plugin-for-online-course-scheduling-917844441fbf?source=rss-fbd5d65dc98f------2</link>
            <guid isPermaLink="false">https://medium.com/p/917844441fbf</guid>
            <dc:creator><![CDATA[Pramod Pudale]]></dc:creator>
            <pubDate>Wed, 21 Mar 2018 07:12:58 GMT</pubDate>
            <atom:updated>2018-03-21T07:12:58.091Z</atom:updated>
            <content:encoded><![CDATA[<p>Features of scheduling courses<br>1. Teacher and student login<br>2. Course schedule by teacher like php<br>3. Display only for php students<br>4. Push notification of events</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=917844441fbf" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>