<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: TutsCoder</title>
    <description>The latest articles on DEV Community by TutsCoder (@dev14).</description>
    <link>https://dev.to/dev14</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F606634%2F6d73ebb3-07cc-49e7-85f3-2bf6b0369dfc.png</url>
      <title>DEV Community: TutsCoder</title>
      <link>https://dev.to/dev14</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/dev14"/>
    <language>en</language>
    <item>
      <title>Announcement: Launch of Powerful Code Scripts to Simplify Development</title>
      <dc:creator>TutsCoder</dc:creator>
      <pubDate>Sat, 05 Oct 2024 17:20:23 +0000</pubDate>
      <link>https://dev.to/dev14/announcement-launch-of-powerful-code-scripts-to-simplify-development-164f</link>
      <guid>https://dev.to/dev14/announcement-launch-of-powerful-code-scripts-to-simplify-development-164f</guid>
      <description>&lt;p&gt;At TutsCoder, we're always striving to help developers save time, boost productivity, and deliver top-quality projects. Today, we’re thrilled to announce the launch of our &lt;b&gt;powerful code scripts collection&lt;/b&gt;, designed specifically to simplify complex development tasks and give you ready-to-use solutions right out of the box.&lt;/p&gt;
&lt;p&gt;Whether you're a seasoned developer or just starting out, these scripts will help you accelerate your workflow and focus on what truly matters—building amazing projects. Let's dive into the features and benefits of our new code scripts that are now available for purchase!&lt;/p&gt;
&lt;p&gt;&lt;b&gt;And this is just the beginning!&lt;/b&gt; We’re already working on more scripts to expand our library, offering even more solutions to common development challenges. Stay tuned for future releases, but for now, let’s dive into the amazing scripts that are already live and ready to transform your workflow.&lt;/p&gt;
&lt;h2 id="our-featured-code-scripts"&gt;Our Featured Code Scripts&lt;/h2&gt;
&lt;p&gt;Here’s a closer look at the scripts currently available on our platform:&lt;/p&gt;
&lt;h3 id="1-social-authentication-script"&gt;1. Social Authentication Script&lt;/h3&gt;
&lt;p&gt;Effortlessly integrate secure social logins with platforms like Google, Facebook, and GitHub. This script is ideal for anyone looking to add authentication without the hassle of coding it from scratch.&lt;/p&gt;
&lt;p&gt;  👉 &lt;a href="https://www.tutscoder.com/scripts/social-authentication-with-angular" rel="noopener noreferrer"&gt;Get the Social Authentication Script Today&lt;/a&gt;&lt;/p&gt;
&lt;h3 id="2-google-analytics-insights-dashboard"&gt;2. Google Analytics Insights Dashboard&lt;/h3&gt;
&lt;p&gt;Make data-driven decisions easier with a beautiful, real-time dashboard that connects directly to your Google Analytics account. Track user behavior, traffic, and key metrics with ease.&lt;/p&gt;
&lt;p&gt;  👉 &lt;a href="https://www.tutscoder.com/scripts/google-analytics-insights-dashbaord-with-nodejs" rel="noopener noreferrer"&gt;Unlock the Power of Analytics – Purchase Now&lt;/a&gt;&lt;/p&gt;
&lt;h3 id="3-database-backup-automation-script"&gt;3. Database Backup Automation Script&lt;/h3&gt;
&lt;p&gt;Automate your database backups and never worry about losing important data again. This script takes care of backups at scheduled intervals, ensuring your data is always secure.&lt;/p&gt;
&lt;p&gt;  Never worry about data loss again! Automate backups and ensure your data is always safe with this efficient tool.&lt;/p&gt;
&lt;p&gt;  👉 &lt;a href="https://www.tutscoder.com/scripts/database-backup-automation-with-nodejs" rel="noopener noreferrer"&gt;Automate Your Backups – Get It Here&lt;/a&gt;&lt;/p&gt;
&lt;h3 id="4-imagico-total-image-transformation-tool"&gt;4. Imagico: Total Image Transformation Tool&lt;/h3&gt;
&lt;p&gt;Transform your images with a versatile tool that handles everything from resizing and cropping to compression and format conversion, all with minimal effort.&lt;/p&gt;
&lt;p&gt;  Transform images effortlessly! Resize, compress, and convert formats with this all-in-one image tool.&lt;/p&gt;
&lt;p&gt;  👉 &lt;a href="https://www.tutscoder.com/scripts/imagico-total-image-transformation-tool" rel="noopener noreferrer"&gt;Transform Your Images – Shop Now&lt;/a&gt;&lt;/p&gt;
&lt;h3 id="5-meanauth-login-system"&gt;5. MEANAUTH – Login System&lt;/h3&gt;
&lt;p&gt;

Easily integrate a secure login system into your MEAN stack projects. With features like user registration, login, and password reset, this script ensures robust user authentication for your web app.&lt;/p&gt;
&lt;p&gt;  👉 &lt;a href="https://www.tutscoder.com/scripts/meanauth-login-system" rel="noopener noreferrer"&gt;Secure Your App with MEANAUTH – Get It Here&lt;/a&gt;&lt;/p&gt;
&lt;h3 id="6-razorpay-payment-gateway-integration-with-nodejs"&gt;6. Razorpay Payment Gateway Integration with Node.js&lt;/h3&gt;
&lt;p&gt;  Simplify payment processing with Razorpay! Seamlessly integrate Razorpay's payment gateway into your Node.js app and start accepting payments with ease. Perfect for eCommerce, subscription services, and more.&lt;/p&gt;
&lt;p&gt;👉 &lt;a href="https://www.tutscoder.com/scripts/razorpay-payment-getway-integration-with-nodejs" rel="noopener noreferrer"&gt;Streamline Payments with Razorpay – Purchase Now&lt;/a&gt;&lt;/p&gt;
&lt;h3 id="7-cashfree-payment-gateway-integration-with-nodejs"&gt;7. Cashfree Payment Gateway Integration with Node.js&lt;/h3&gt;
&lt;p&gt;  Effortlessly integrate Cashfree’s payment gateway into your Node.js application. This script helps you securely manage transactions, allowing for smooth payment processing across different platforms.&lt;/p&gt;
&lt;p&gt;👉 &lt;a href="https://www.tutscoder.com/scripts/cashfree-payment-getway-integration-with-nodejs" rel="noopener noreferrer"&gt;Enable Cashfree Payments Today – Get It Here&lt;/a&gt;&lt;/p&gt;
&lt;h3 id="8-stripe-payment-gateway-integration-with-nodejs"&gt;8. Stripe Payment Gateway Integration with Node.js&lt;/h3&gt;
&lt;p&gt;  Take the hassle out of payment processing with Stripe. This integration script allows you to securely accept payments, manage subscriptions, and handle transactions directly through your Node.js app.&lt;/p&gt;
&lt;p&gt;👉 &lt;a href="https://www.tutscoder.com/scripts/stripe-payment-getway-integration-with-nodejs" rel="noopener noreferrer"&gt;Simplify Payments with Stripe – Buy It Now&lt;/a&gt;&lt;/p&gt;
&lt;h3 id="9-nodeauth-login-system"&gt;9. NODEAUTH – Login System&lt;/h3&gt;
&lt;p&gt;  A complete login solution for Node.js applications, NODEAUTH offers user registration, login, password reset, and session management. Perfect for securing any Node.js-based app with minimal effort.&lt;/p&gt;
&lt;p&gt;👉 &lt;a href="https://www.tutscoder.com/scripts/nodeauth-login-system" rel="noopener noreferrer"&gt;Secure Your Node.js App with NODEAUTH – Get It Here&lt;/a&gt;&lt;/p&gt;
&lt;h3 id="10-aws-s3-presigned-upload-amp-download-script"&gt;10. AWS S3 Presigned Upload &amp;amp; Download Script&lt;/h3&gt;
&lt;p&gt;  Easily manage file uploads and downloads with AWS S3. This script generates presigned URLs for secure and temporary file access, perfect for apps that handle user-uploaded content.&lt;/p&gt;
&lt;p&gt;👉 &lt;a href="https://www.tutscoder.com/scripts/aws-s3-presigned-upload-and-download-script" rel="noopener noreferrer"&gt;Enhance File Management with AWS S3 – Purchase Now&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="why-our-code-scripts-are-a-musthave"&gt;Why Our Code Scripts Are a Must-Have&lt;/h2&gt;
&lt;p&gt;These scripts are designed with both speed and simplicity in mind. Here’s why you should consider integrating them into your projects:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Time-Saving: Avoid reinventing the wheel. Each script offers a plug-and-play solution for common development tasks, so you can focus on building your product.&lt;/li&gt;
&lt;li&gt;High Quality: All of our scripts are thoroughly tested and optimized to ensure peak performance and seamless integration.&lt;/li&gt;
&lt;li&gt;Easy Customization: We know every project is unique, so we’ve made our scripts fully customizable to meet your specific needs.&lt;/li&gt;
&lt;li&gt;Affordable: Get access to premium tools at a fraction of the cost of developing them from scratch.&lt;/li&gt;
&lt;li&gt;Developer Support: Our team is here to help if you need assistance with integration or customization.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="whats-coming-next"&gt;What’s Coming Next?&lt;/h3&gt;
&lt;p&gt;We’re just getting started! Our team is hard at work developing more scripts that will cover a wide range of functionalities, including:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Advanced User Analytics Dashboards&lt;/li&gt;
&lt;li&gt;AI-Powered Content Generators&lt;/li&gt;
&lt;li&gt;Customizable CMS Solutions&lt;/li&gt;
&lt;li&gt;Push Notification Systems&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;And so much more! Keep an eye on our announcements for new releases coming soon.&lt;/p&gt;
&lt;h3 id="how-to-get-these-scripts"&gt;How to Get These Scripts&lt;/h3&gt;
&lt;p&gt;Purchasing and integrating our scripts is simple. Here’s how you can get started:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Visit Our Scripts Page: Browse through the collection of scripts currently available.&lt;/li&gt;
&lt;li&gt;Choose Your Script: Click on the script you want and review the detailed description, key features, and pricing.&lt;/li&gt;
&lt;li&gt;Add to Cart and Checkout: Once you’ve found what you need, add it to your cart and proceed to checkout.&lt;/li&gt;
&lt;li&gt;Download &amp;amp; Integrate: Instantly download your purchased script and easily integrate it into your project.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;a href="https://www.tutscoder.com/scripts" rel="noopener noreferrer"&gt;Shop Our Scripts Now&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="special-launch-offer-save-20-on-all-scripts"&gt;Special Launch Offer: Save 20% on All Scripts!&lt;/h2&gt;
&lt;p&gt;To celebrate the launch, we’re offering a 20% discount on all of our code scripts for a limited time. Simply use the promo code LAUNCH20 at checkout to enjoy this exclusive deal. This offer won’t last long, so take advantage of it while you can!&lt;/p&gt;
&lt;h3 id="how-to-purchase"&gt;How to Purchase&lt;/h3&gt;
&lt;p&gt;Ready to simplify your development process? Here’s how you can get started:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Visit our Code Scripts Page: &lt;a href="https://www.tutscoder.com/scripts" rel="noopener noreferrer"&gt;TutsCoder Code Scripts&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Browse through the scripts: Check out detailed descriptions and features.&lt;/li&gt;
&lt;li&gt;Add to Cart: Choose the scripts that best fit your needs.&lt;/li&gt;
&lt;li&gt;Apply Discount: Don’t forget to use LAUNCH20 for 20% off your purchase.&lt;/li&gt;
&lt;li&gt;Download &amp;amp; Integrate: Instantly download the script and start improving your projects!&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id="stay-tuned-for-more"&gt;Stay Tuned for More!&lt;/h3&gt;
&lt;p&gt;This is just the beginning of our journey to bring you powerful, ready-to-use tools to enhance your development experience. New scripts are on the way, and we can’t wait to share them with you. Follow us on social media and subscribe to our newsletter to stay updated on future releases and special offers.&lt;/p&gt;
&lt;p&gt;Start simplifying your development today with our premium code scripts—more exciting tools are coming soon!&lt;/p&gt;
&lt;p&gt;Thank you for being part of the TutsCoder community—we can't wait to see how these scripts make your development easier and more efficient.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.tutscoder.com/scripts" rel="noopener noreferrer"&gt;Shop Now&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
    </item>
    <item>
      <title>Automate Node.js Deployment on a VPS Using GitHub Actions</title>
      <dc:creator>TutsCoder</dc:creator>
      <pubDate>Tue, 06 Aug 2024 12:13:05 +0000</pubDate>
      <link>https://dev.to/dev14/automate-nodejs-deployment-on-a-vps-using-github-actions-1ce6</link>
      <guid>https://dev.to/dev14/automate-nodejs-deployment-on-a-vps-using-github-actions-1ce6</guid>
      <description>&lt;p&gt;In today's fast-paced development environment, automating your Node.js deployment process is crucial. One effective way to achieve this for your Node.js application is by using GitHub Actions.&lt;/p&gt;

&lt;p&gt;In this article, we'll walk you through setting up a GitHub Actions workflow to automate the deployment of your Node.js application to a Virtual Private Server (VPS).&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Automate Node.js Deployment?
&lt;/h2&gt;

&lt;p&gt;Automating Node.js deployment has several benefits:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Consistency:&lt;/strong&gt; Ensures the same steps are followed every time you deploy, reducing human error.&lt;br&gt;
&lt;strong&gt;Speed:&lt;/strong&gt; Saves time by eliminating manual steps.&lt;br&gt;
&lt;strong&gt;Reliability:&lt;/strong&gt; Automated tests and checks can catch issues before they reach production.&lt;br&gt;
Read the full guide on my blog: &lt;a href="https://www.tutscoder.com/post/automate-nodejs-deployment-vps-github-actions" rel="noopener noreferrer"&gt;Automate Node.js Deployment on a VPS Using GitHub Actions&lt;/a&gt;&lt;/p&gt;

</description>
      <category>node</category>
      <category>githubactions</category>
      <category>devops</category>
      <category>webdev</category>
    </item>
    <item>
      <title>How to Implement Role-Based Access Control with JWT-Based Authorization in Angular</title>
      <dc:creator>TutsCoder</dc:creator>
      <pubDate>Sun, 12 Mar 2023 14:30:00 +0000</pubDate>
      <link>https://dev.to/dev14/how-to-implement-role-based-access-control-with-jwt-based-authorization-in-angular-3cen</link>
      <guid>https://dev.to/dev14/how-to-implement-role-based-access-control-with-jwt-based-authorization-in-angular-3cen</guid>
      <description>&lt;p&gt; As web applications become more complex and user data is increasingly sensitive, it is essential to implement proper access control mechanisms to secure the application resources.  &lt;/p&gt;
&lt;p&gt; One effective method for implementing access control is &lt;b&gt;Role-Based Access Control (RBAC)&lt;/b&gt;.  &lt;/p&gt;
&lt;p&gt; In this blog post, we will show you how to implement RBAC with&lt;b&gt; JSON Web Token (JWT)&lt;/b&gt; based authorization in an Angular application. &lt;/p&gt;
&lt;h2&gt;Step 1: Setup Angular Application&lt;/h2&gt;
&lt;p&gt; First, we need to set up an Angular application,Open your terminal and run the following command:&lt;br&gt; &lt;/p&gt;
&lt;pre&gt;&lt;code&gt;ng new angular-rbac-jwt
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Step 2: Create User and Role Interfaces&lt;/h2&gt;
&lt;p&gt; Next, we need to define user and role interfaces. In this example, we will create two interfaces in a new file named &lt;code&gt;user.ts&lt;/code&gt;: &lt;/p&gt;

&lt;p&gt;Also read,&lt;a href="https://www.tutscoder.com/post/lazy-loading-images-angular" rel="noopener noreferrer"&gt;Optimize Page Load Speed With Lazy Loading Images in Angular&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;export interface User {&lt;br&gt;
  id: number;&lt;br&gt;
  username: string;&lt;br&gt;
  password: string;&lt;br&gt;
  role: Role;&lt;br&gt;
}

&lt;p&gt;export interface Role {&lt;br&gt;
  id: number;&lt;br&gt;
  name: string;&lt;br&gt;
  permissions: string[];&lt;br&gt;
}&lt;/p&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt; We define a user interface with an id, username, password, and role. The role property is an object of type Role that has an id, name, and permissions array. &lt;/p&gt;
&lt;h2&gt;Step 3: Create JWT Service&lt;/h2&gt;
&lt;p&gt; To handle JWT-based authentication and authorization, we need to create a service. Create a new file named &lt;code&gt;auth.service.ts&lt;/code&gt; and add the following code: &lt;/p&gt;
&lt;pre&gt;&lt;code&gt;import { Injectable } from '@angular/core';&lt;br&gt;
import { HttpClient } from '@angular/common/http';&lt;br&gt;
import { Observable } from 'rxjs';&lt;br&gt;
import { tap } from 'rxjs/operators';&lt;br&gt;
import { User } from './user';

&lt;p&gt;@Injectable({&lt;br&gt;
  providedIn: 'root'&lt;br&gt;
})&lt;br&gt;
export class AuthService {&lt;br&gt;
  private apiUrl = '&lt;a href="http://localhost:3000/api/auth" rel="noopener noreferrer"&gt;http://localhost:3000/api/auth&lt;/a&gt;';&lt;/p&gt;

&lt;p&gt;constructor(private http: HttpClient) { }&lt;/p&gt;

&lt;p&gt;login(username: string, password: string): Observable&amp;lt;any&amp;gt; {&lt;br&gt;
    return this.http.post&amp;lt;any&amp;gt;(&lt;code&gt;${this.apiUrl}/login&lt;/code&gt;, { username, password })&lt;br&gt;
      .pipe(&lt;br&gt;
        tap(res =&amp;gt; {&lt;br&gt;
          localStorage.setItem('access_token', res.access_token);&lt;br&gt;
        })&lt;br&gt;
      );&lt;br&gt;
  }&lt;/p&gt;

&lt;p&gt;logout() {&lt;br&gt;
    localStorage.removeItem('access_token');&lt;br&gt;
  }&lt;/p&gt;

&lt;p&gt;public get loggedIn(): boolean {&lt;br&gt;
    return localStorage.getItem('access_token') !== null;&lt;br&gt;
  }&lt;/p&gt;

&lt;p&gt;get currentUser(): User {&lt;br&gt;
    const token = localStorage.getItem('access_token');&lt;br&gt;
    if (!token) {&lt;br&gt;
      return null;&lt;br&gt;
    }&lt;br&gt;
    const payload = JSON.parse(atob(token.split('.')[1]));&lt;br&gt;
    return payload.user;&lt;br&gt;
  }&lt;/p&gt;

&lt;p&gt;public hasPermission(permission: string): boolean {&lt;br&gt;
    const user = this.currentUser;&lt;br&gt;
    if (!user || !user.role || !user.role.permissions) {&lt;br&gt;
      return false;&lt;br&gt;
    }&lt;br&gt;
    return user.role.permissions.includes(permission);&lt;br&gt;
  }&lt;br&gt;
}&lt;br&gt;
&lt;/p&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt; We define an &lt;code&gt;AuthService&lt;/code&gt; class with a &lt;code&gt;login()&lt;/code&gt; method that sends a POST request to our API with the username and password. If the API returns an access token, we store it in local storage using the &lt;code&gt;tap()&lt;/code&gt; operator. We also define a &lt;code&gt;logout()&lt;/code&gt; method to remove the access token from local storage. &lt;/p&gt;
&lt;p&gt; The &lt;code&gt;loggedIn&lt;/code&gt; property returns a boolean indicating whether the user is currently authenticated based on the presence of the access token in local storage. The &lt;code&gt;currentUser&lt;/code&gt; property returns the user object stored in the access token's payload. Finally, the &lt;code&gt;hasPermission()&lt;/code&gt; method takes a permission string and checks if the current user has that permission based on their role. &lt;/p&gt;
&lt;h2&gt;Step 4: Implement Role-Based Access Control&lt;/h2&gt;
&lt;p&gt; To implement role-based access control, we will create a guard that checks if the user has the required permission to access a route. Create a new file named &lt;code&gt;role.guard.ts&lt;/code&gt; and add the following code: &lt;/p&gt;
&lt;pre&gt;&lt;code&gt;import { Injectable } from '@angular/core';&lt;br&gt;
import { CanActivate, ActivatedRouteSnapshot, RouterStateSnapshot, Router } from '@angular/router';&lt;br&gt;
import { AuthService } from './auth.service';

&lt;p&gt;@Injectable({&lt;br&gt;
  providedIn: 'root'&lt;br&gt;
})&lt;br&gt;
export class RoleGuard implements CanActivate {&lt;/p&gt;

&lt;p&gt;constructor(private authService: AuthService, private router: Router) {}&lt;/p&gt;

&lt;p&gt;canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): boolean {&lt;br&gt;
    const requiredPermission = route.data.requiredPermission;&lt;br&gt;
    if (this.authService.hasPermission(requiredPermission)) {&lt;br&gt;
      return true;&lt;br&gt;
    }&lt;br&gt;
    this.router.navigate(['/login']);&lt;br&gt;
    return false;&lt;br&gt;
  }&lt;br&gt;
}&lt;/p&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt; The &lt;code&gt;RoleGuard&lt;/code&gt; class implements the &lt;code&gt;CanActivate&lt;/code&gt; interface and defines a &lt;code&gt;canActivate()&lt;/code&gt; method. This method checks if the current user has the required permission to access the route. If the user has the required permission, the method returns &lt;code&gt;true&lt;/code&gt;, allowing the user to access the route. If the user does not have the required permission, the method redirects the user to the login page and returns &lt;code&gt;false&lt;/code&gt;. &lt;/p&gt;
&lt;h2&gt;Step 5: Use the RoleGuard&lt;/h2&gt;
&lt;p&gt; Now that we have defined the &lt;code&gt;RoleGuard&lt;/code&gt;, we can use it to protect routes that require specific permissions. For example, suppose we have a route that allows only users with the &lt;code&gt;viewReports&lt;/code&gt; permission to access. We can protect this route by adding the &lt;code&gt;RoleGuard&lt;/code&gt; to the route's &lt;code&gt;canActivate&lt;/code&gt; property and passing the required permission as data. Here's an example: &lt;/p&gt;
&lt;pre&gt;&lt;code&gt;import { NgModule } from '@angular/core';&lt;br&gt;
import { RouterModule, Routes } from '@angular/router';&lt;br&gt;
import { HomeComponent } from './home/home.component';&lt;br&gt;
import { LoginComponent } from './login/login.component';&lt;br&gt;
import { ReportsComponent } from './reports/reports.component';&lt;br&gt;
import { RoleGuard } from './role.guard';

&lt;p&gt;const routes: Routes = [&lt;br&gt;
  { path: '', component: HomeComponent },&lt;br&gt;
  { path: 'login', component: LoginComponent },&lt;br&gt;
  { path: 'reports', component: ReportsComponent, canActivate: [RoleGuard], data: { requiredPermission: 'viewReports' } }&lt;br&gt;
];&lt;/p&gt;


&lt;p&gt;@NgModule({&lt;br&gt;&lt;br&gt;
  imports: [RouterModule.forRoot(routes)],&lt;br&gt;&lt;br&gt;
  exports: [RouterModule]&lt;br&gt;&lt;br&gt;
})&lt;br&gt;&lt;br&gt;
export class AppRoutingModule { }&lt;/p&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt; In the above code, we add the &lt;code&gt;RoleGuard&lt;/code&gt; to the &lt;code&gt;canActivate&lt;/code&gt; property of the &lt;code&gt;ReportsComponent&lt;/code&gt; route and pass the &lt;code&gt;viewReports&lt;/code&gt; permission as data. &lt;/p&gt;
&lt;p&gt; Step 6: Test the Application &lt;/p&gt;
&lt;p&gt; To test the application, we need to create a mock API that returns an access token with a user object containing a role with permissions. For this example, we will use &lt;code&gt;json-server&lt;/code&gt; to create a mock API. &lt;/p&gt;
&lt;p&gt; Create a &lt;code&gt;db.json&lt;/code&gt; file with the following code: &lt;/p&gt;
&lt;pre&gt;&lt;code&gt;{&lt;br&gt;&lt;br&gt;
  "users": [&lt;br&gt;&lt;br&gt;
    {&lt;br&gt;&lt;br&gt;
      "id": 1,&lt;br&gt;&lt;br&gt;
      "username": "admin",&lt;br&gt;&lt;br&gt;
      "password": "admin",&lt;br&gt;&lt;br&gt;
      "role": {&lt;br&gt;&lt;br&gt;
        "id": 1,&lt;br&gt;&lt;br&gt;
        "name": "Administrator",&lt;br&gt;&lt;br&gt;
        "permissions": ["viewReports", "editReports", "deleteReports"]&lt;br&gt;&lt;br&gt;
      }&lt;br&gt;&lt;br&gt;
    },&lt;br&gt;&lt;br&gt;
    {&lt;br&gt;&lt;br&gt;
      "id": 2,&lt;br&gt;&lt;br&gt;
      "username": "user",&lt;br&gt;&lt;br&gt;
      "password": "user",&lt;br&gt;&lt;br&gt;
      "role": {&lt;br&gt;&lt;br&gt;
        "id": 2,&lt;br&gt;&lt;br&gt;
        "name": "User",&lt;br&gt;&lt;br&gt;
        "permissions": ["viewReports"]&lt;br&gt;&lt;br&gt;
      }&lt;br&gt;&lt;br&gt;
    }&lt;br&gt;&lt;br&gt;
  ]&lt;br&gt;&lt;br&gt;
}&lt;br&gt;&lt;br&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt; This file defines two users with different roles and permissions. &lt;/p&gt;
&lt;p&gt; To start the mock API, run the following command in your terminal: &lt;/p&gt;
&lt;pre&gt;&lt;code&gt;json-server --watch db.json&lt;br&gt;&lt;br&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt; This will start a mock API server at &lt;code&gt;&lt;a href="http://localhost:3000" rel="noopener noreferrer"&gt;&lt;/a&gt;&lt;a href="http://localhost:3000" rel="noopener noreferrer"&gt;http://localhost:3000&lt;/a&gt;&lt;/code&gt;. &lt;/p&gt;
&lt;p&gt; Now we can test the application by logging in with the &lt;code&gt;admin&lt;/code&gt; user and trying to access the &lt;code&gt;/reports&lt;/code&gt; route. The &lt;code&gt;admin&lt;/code&gt; user has the &lt;code&gt;viewReports&lt;/code&gt;, &lt;code&gt;editReports&lt;/code&gt;, and &lt;code&gt;deleteReports&lt;/code&gt; permissions, so they should be able to access the &lt;code&gt;/reports&lt;/code&gt; route. &lt;/p&gt;
&lt;p&gt; To log in, enter the &lt;code&gt;admin&lt;/code&gt; username and password on the login page. Once logged in, click on the "Reports" link in the navigation menu. This should take you to the &lt;code&gt;ReportsComponent&lt;/code&gt;. &lt;/p&gt;
&lt;p&gt; To test if the &lt;code&gt;RoleGuard&lt;/code&gt; is working, add the &lt;code&gt;canActivate&lt;/code&gt; property to the &lt;code&gt;HomeComponent&lt;/code&gt; route and set it to the &lt;code&gt;RoleGuard&lt;/code&gt; with the &lt;code&gt;viewReports&lt;/code&gt; permission. This will prevent users without the &lt;code&gt;viewReports&lt;/code&gt; permission from accessing the home page. &lt;/p&gt;
&lt;p&gt; Here's an example of how to protect the home page with the &lt;code&gt;RoleGuard&lt;/code&gt;: &lt;/p&gt;
&lt;pre&gt;&lt;code&gt;{ path: '', component: HomeComponent, canActivate: [RoleGuard], data: { requiredPermission: 'viewReports' } },&lt;br&gt;&lt;br&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt; Now, if you log in with the &lt;code&gt;user&lt;/code&gt; username and password, which only has the &lt;code&gt;viewReports&lt;/code&gt; permission, you should be redirected to the login page when trying to access the home page. &lt;/p&gt;
&lt;p&gt; &lt;b&gt;Congratulations!&lt;/b&gt; You have successfully implemented role-based access control with JWT-based authorization in Angular. &lt;/p&gt;
&lt;br&gt;&lt;br&gt;
&lt;a href="https://www.tutscoder.com/post/role-based-access-control-jwt-angular-guide" rel="noopener noreferrer"&gt;How To Implement Role-Based Access Control With JWT-Based Authorization In Angular&lt;br&gt;&lt;br&gt;
&lt;/a&gt;

</description>
      <category>angular</category>
      <category>howto</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Revert Your Git Changes: A Step-by-Step Guide</title>
      <dc:creator>TutsCoder</dc:creator>
      <pubDate>Fri, 10 Mar 2023 13:25:49 +0000</pubDate>
      <link>https://dev.to/dev14/revert-your-git-changes-a-step-by-step-guide-3nbe</link>
      <guid>https://dev.to/dev14/revert-your-git-changes-a-step-by-step-guide-3nbe</guid>
      <description>&lt;p&gt; In this article, we will learn how to undo changes in Git using different methods such as &lt;b&gt;git revert&lt;/b&gt;, &lt;b&gt;git reset&lt;/b&gt;, and &lt;b&gt;git checkout&lt;/b&gt;.  &lt;/p&gt;
&lt;p&gt; Git is a popular version control system that allows developers to track and manage their code changes. However, mistakes can happen, and sometimes you may need to revert changes made in your Git repository.  &lt;/p&gt;
&lt;h2&gt;Revert Your Git Changes step by step&lt;/h2&gt;
&lt;h3&gt;Method 1 : Git Revert&lt;/h3&gt;
&lt;p&gt; Git revert is a safe option for undoing changes in Git as it only reverses specific commits, preserving the project's history. To revert changes using git revert, you need to specify the commit hash that you want to revert. &lt;/p&gt;
&lt;p&gt; Steps: &lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Open the command line in your local repository&lt;/li&gt;
&lt;li&gt;Type git log to view the list of commits&lt;/li&gt;
&lt;li&gt;Copy the commit hash of the commit you want to revert&lt;/li&gt;
&lt;li&gt;Type git revert &amp;lt;commit_hash&amp;gt; to revert the changes&lt;/li&gt;
&lt;li&gt;Push the changes to your remote repository using git push&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Method 2 : Git Reset&lt;/h3&gt;
&lt;p&gt; Git reset is a powerful command that allows you to reset your repository to a previous state. However, it can also permanently erase commits and alter the project's history. &lt;/p&gt;
&lt;p&gt; Steps: &lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Open the command line in your local repository&lt;/li&gt;
&lt;li&gt;Type git log to view the list of commits&lt;/li&gt;
&lt;li&gt;Copy the commit hash of the commit you want to revert to&lt;/li&gt;
&lt;li&gt;Type git reset --hard &amp;lt;commit_hash&amp;gt; to revert the changes&lt;/li&gt;
&lt;li&gt;Push the changes to your remote repository using git push&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Method 3 : Git Checkout&lt;/h3&gt;
&lt;p&gt; Git checkout is a versatile command that allows you to switch between branches or restore specific files to a previous state. To undo changes in Git using git checkout, you need to specify the file or branch you want to restore. &lt;/p&gt;
&lt;p&gt; Steps: &lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Open the command line in your local repository&lt;/li&gt;
&lt;li&gt;Type git status to view the list of modified files&lt;/li&gt;
&lt;li&gt;Type git checkout &amp;lt;file&amp;gt; to restore a specific file to its previous state&lt;/li&gt;
&lt;li&gt;Or type git checkout &amp;lt;branch_name&amp;gt; to switch to a previous branch and restore its state&lt;/li&gt;
&lt;li&gt;Push the changes to your remote repository using git push&lt;/li&gt;
&lt;/ul&gt;
&lt;h4&gt;Conclusion:&lt;/h4&gt;
&lt;p&gt; Git provides several methods to undo changes, each with its own benefits and drawbacks. Git revert is a safe option that preserves the project's history, while git reset allows you to reset the repository to a previous state, and git checkout is a versatile command that allows you to switch between branches or restore specific files. We hope this step-by-step guide will help you effectively revert changes in your Git repository. &lt;/p&gt;

</description>
      <category>webdev</category>
      <category>howto</category>
      <category>git</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Optimize Page Load Speed with Lazy Loading Images in Angular 15</title>
      <dc:creator>TutsCoder</dc:creator>
      <pubDate>Fri, 10 Mar 2023 13:24:53 +0000</pubDate>
      <link>https://dev.to/dev14/optimize-page-load-speed-with-lazy-loading-images-in-angular-15-26n7</link>
      <guid>https://dev.to/dev14/optimize-page-load-speed-with-lazy-loading-images-in-angular-15-26n7</guid>
      <description>&lt;p&gt; Lazy loading images is a technique that helps to optimize the performance of a website by deferring the loading of images until they are needed. This can significantly improve the page load time, especially for websites with many images. In this article, we will be discussing how to implement lazy loading of images in an Angular 15 application using the ng-lazyload-image plugin. &lt;/p&gt;
&lt;p&gt; ng-lazyload-image is a popular and highly-rated Angular library that makes it easy to implement lazy loading of images. It uses IntersectionObserver, a native API for detecting when an element enters or exits the viewport, to determine when to load images. This approach is much more efficient than using the traditional scroll or resize event-based approaches, which can negatively impact the performance of a website. &lt;/p&gt;
&lt;p&gt; Getting started with ng-lazyload-image is simple. To install it, simply run the following command in your Angular project: &lt;/p&gt;
&lt;pre&gt;&lt;code&gt;npm install ng-lazyload-image --save&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt; Once installed, you can import the LazyLoadImageModule in your Angular module to make it available throughout your application: &lt;/p&gt;
&lt;pre&gt;&lt;code&gt;import { LazyLoadImageModule } from 'ng-lazyload-image';

@NgModule({
  imports: [
    LazyLoadImageModule
  ]
})
export class AppModule { }
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt; Next, you can use the &lt;code&gt;lazyLoad&lt;/code&gt; directive in your templates to specify the images that should be lazy loaded: &lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;img [lazyLoad]="imageUrl" [offset]="offset" [defaultImage]="defaultImage" [errorImage]="errorImage"&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt; The &lt;code&gt;lazyLoad&lt;/code&gt; directive takes several optional parameters: &lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;offset: The number of pixels before the image enters the viewport to start loading it.&lt;/li&gt;
&lt;li&gt;defaultImage: An image to display while the lazy-loaded image is loading.&lt;/li&gt;
&lt;li&gt;errorImage: An image to display if the lazy-loaded image fails to load.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt; By using ng-lazyload-image, you can significantly improve the performance of your Angular 15 application and provide a better user experience for your users. Give it a try today! &lt;/p&gt;
&lt;p&gt; In conclusion, ng-lazyload-image is a simple and efficient way to implement lazy loading of images in an Angular 15 application. It's easy to install and use, and can have a significant impact on the performance of your website. Give it a try and see for yourself! &lt;/p&gt;

</description>
      <category>angular</category>
    </item>
    <item>
      <title>Hello, World!</title>
      <dc:creator>TutsCoder</dc:creator>
      <pubDate>Sat, 25 Feb 2023 16:17:02 +0000</pubDate>
      <link>https://dev.to/dev14/hello-world-3odk</link>
      <guid>https://dev.to/dev14/hello-world-3odk</guid>
      <description>&lt;p&gt;Hello DEV, this is my first post&lt;/p&gt;

</description>
      <category>watercooler</category>
      <category>discuss</category>
      <category>hello</category>
    </item>
    <item>
      <title>How to check-uncheck all checkbox With jQuery</title>
      <dc:creator>TutsCoder</dc:creator>
      <pubDate>Fri, 10 Feb 2023 05:59:55 +0000</pubDate>
      <link>https://dev.to/dev14/how-to-check-uncheck-all-checkbox-with-jquery-34ff</link>
      <guid>https://dev.to/dev14/how-to-check-uncheck-all-checkbox-with-jquery-34ff</guid>
      <description>&lt;p&gt; Howdy Coders, &lt;/p&gt;
&lt;p&gt; In this post, we are going to see how to check-uncheck all checkboxes using jQuery. &lt;/p&gt;
&lt;p&gt; It becomes useful when you want to allow users to select or deselect all checkboxes at once by clicking one checkbox rather than selecting one by one checkbox Just like Amazon, Flipkart like size uses for its product filtering. &lt;/p&gt;
&lt;h2&gt;Steps by step Guide to select/Deselect checkbox using jQuery:&lt;/h2&gt;
&lt;p&gt; If you are new to Jquery or want to learn some basic before starting this tutorial, I must recommend to please checkout &lt;a href="https://www.tutscoder.com/learn-javascript-from-scratch" rel="noopener noreferrer"&gt;learn-javascript-from-scratch&lt;/a&gt; and &lt;a href="https://www.tutscoder.com/jquery-step-by-step-tutorial-for-beginners/" rel="noopener noreferrer"&gt;jquery-step-by-step-tutorial-for-beginners&lt;/a&gt; &lt;/p&gt;
&lt;p&gt; So, here I am going to show how this can be done by using Jquery. It can become handy and I have also used it on many projects and it's working great for me. &lt;/p&gt;
&lt;p&gt; So let’s start. &lt;/p&gt;
&lt;p&gt; &lt;b&gt;STEP-1:&lt;/b&gt; &lt;/p&gt;
&lt;p&gt; First of all, you have to add the jquery library to your page: &lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;head&amp;gt;
&amp;lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"&amp;gt;&amp;lt;/script&amp;gt;
&amp;lt;/head&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt; &lt;b&gt;STEP-2:&lt;/b&gt; &lt;/p&gt;
&lt;p&gt; Create a Blank HTML file and put the following code: &lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;body&amp;gt;
&amp;lt;div id="container"&amp;gt;
    &amp;lt;div id="body"&amp;gt;
        &amp;lt;div class="header" &amp;gt;Check/Uncheck all checkbox with Jquery&amp;lt;/div&amp;gt;

            &amp;lt;table class="bordered" &amp;gt;
                &amp;lt;tr&amp;gt;
                    &amp;lt;th width="10%"&amp;gt;&amp;lt;input type="checkbox" name="chk_all" class="chk_all"&amp;gt;&amp;lt;/th&amp;gt;
                    &amp;lt;th &amp;gt;Select All Items&amp;lt;/th&amp;gt;
                &amp;lt;/tr&amp;gt;
                &amp;lt;tr&amp;gt;
                    &amp;lt;td &amp;gt;&amp;lt;input type="checkbox" name="country_id" class="checkboxes" value="6" &amp;gt;&amp;lt;/td&amp;gt;
                    &amp;lt;td &amp;gt; Item-1 &amp;lt;/td&amp;gt;
                &amp;lt;/tr&amp;gt;
                &amp;lt;tr&amp;gt;
                    &amp;lt;td &amp;gt;&amp;lt;input type="checkbox" name="country_id" class="checkboxes" value="7" &amp;gt;&amp;lt;/td&amp;gt;
                    &amp;lt;td &amp;gt; Item-2 &amp;lt;/td&amp;gt;
                &amp;lt;/tr&amp;gt;
                &amp;lt;tr&amp;gt;
                    &amp;lt;td &amp;gt;&amp;lt;input type="checkbox" name="country_id" class="checkboxes" value="8" &amp;gt;&amp;lt;/td&amp;gt;
                    &amp;lt;td &amp;gt; Item-3 &amp;lt;/td&amp;gt;
                &amp;lt;/tr&amp;gt;
                &amp;lt;tr&amp;gt;
                    &amp;lt;td &amp;gt;&amp;lt;input type="checkbox" name="country_id" class="checkboxes" value="9" &amp;gt;&amp;lt;/td&amp;gt;
                    &amp;lt;td &amp;gt; Item-4 &amp;lt;/td&amp;gt;
                &amp;lt;/tr&amp;gt;
                &amp;lt;tr&amp;gt;
                    &amp;lt;td&amp;gt;&amp;lt;input type="checkbox" name="country_id" class="checkboxes" value="10" &amp;gt;&amp;lt;/td&amp;gt;
                    &amp;lt;td &amp;gt; Item-5 &amp;lt;/td&amp;gt;
                &amp;lt;/tr&amp;gt;
                &amp;lt;tr&amp;gt;
                    &amp;lt;td &amp;gt;&amp;lt;input type="checkbox" name="country_id" class="checkboxes" value="10" &amp;gt;&amp;lt;/td&amp;gt;
                    &amp;lt;td &amp;gt; Item-6 &amp;lt;/td&amp;gt;
                &amp;lt;/tr&amp;gt;

            &amp;lt;/table&amp;gt;

    &amp;lt;/div&amp;gt;
&amp;lt;/div&amp;gt;
&amp;lt;/body&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt; &lt;b&gt;STEP-3:&lt;/b&gt; &lt;/p&gt;
&lt;p&gt; After ending the HTML tag add some Javascript code including with script tag as follow: &lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;script type="text/javascript"&amp;gt;
    $(document).ready(function () {

        //To Check all checkbox
        $(".chk_all").click(function () {

            var checkAll = $(".chk_all").prop('checked');
            if (checkAll) {
                $(".checkboxes").prop("checked", true);
            } else {
                $(".checkboxes").prop("checked", false);
            }

        });

        // if all checkbox are selected, check the chk_all checkbox
        $(".checkboxes").click(function ()
        {
            if($(".checkboxes").length==$(".subscheked:checked").length)
            {
                $(".chk_all").attr("checked", "checked");
            }
            else
            {
                $(".chk_all").removeAttr("checked");
            }
        });

    });
&amp;lt;/script&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt; Now you are done. If you find any issue checkout the complete source code given below: &lt;/p&gt;
&lt;p&gt; &lt;b&gt;Complete source code:&lt;/b&gt; &lt;/p&gt;
&lt;p&gt; &lt;b&gt;Index.html&lt;/b&gt; &lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;html&amp;gt;
&amp;lt;head&amp;gt;
&amp;lt;script type="text/javascript" src="jquery.js"&amp;gt;&amp;lt;/script&amp;gt;
    &amp;lt;link rel="stylesheet" href="style.css" type="text/css" /&amp;gt;
&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;
&amp;lt;div id="container"&amp;gt;
    &amp;lt;div id="body"&amp;gt;
        &amp;lt;div class="header" &amp;gt;Check/Uncheck all checkbox with Jquery&amp;lt;/div&amp;gt;

            &amp;lt;table class="bordered" &amp;gt;
                &amp;lt;tr&amp;gt;
                    &amp;lt;th width="10%"&amp;gt;&amp;lt;input type="checkbox" name="chk_all" class="chk_all"&amp;gt;&amp;lt;/th&amp;gt;
                    &amp;lt;th &amp;gt;Select All Items&amp;lt;/th&amp;gt;
                &amp;lt;/tr&amp;gt;

                &amp;lt;tr&amp;gt;
                    &amp;lt;td &amp;gt;&amp;lt;input type="checkbox" name="country_id" class="checkboxes" value="6" &amp;gt;&amp;lt;/td&amp;gt;
                    &amp;lt;td &amp;gt; Item-1 &amp;lt;/td&amp;gt;
                &amp;lt;/tr&amp;gt;
                &amp;lt;tr&amp;gt;
                    &amp;lt;td &amp;gt;&amp;lt;input type="checkbox" name="country_id" class="checkboxes" value="7" &amp;gt;&amp;lt;/td&amp;gt;
                    &amp;lt;td &amp;gt; Item-2 &amp;lt;/td&amp;gt;
                &amp;lt;/tr&amp;gt;
                &amp;lt;tr&amp;gt;
                    &amp;lt;td &amp;gt;&amp;lt;input type="checkbox" name="country_id" class="checkboxes" value="8" &amp;gt;&amp;lt;/td&amp;gt;
                    &amp;lt;td &amp;gt; Item-3 &amp;lt;/td&amp;gt;
                &amp;lt;/tr&amp;gt;
                &amp;lt;tr&amp;gt;
                    &amp;lt;td &amp;gt;&amp;lt;input type="checkbox" name="country_id" class="checkboxes" value="9" &amp;gt;&amp;lt;/td&amp;gt;
                    &amp;lt;td &amp;gt; Item-4 &amp;lt;/td&amp;gt;
                &amp;lt;/tr&amp;gt;
                &amp;lt;tr&amp;gt;
                    &amp;lt;td&amp;gt;&amp;lt;input type="checkbox" name="country_id" class="checkboxes" value="10" &amp;gt;&amp;lt;/td&amp;gt;
                    &amp;lt;td &amp;gt; Item-5 &amp;lt;/td&amp;gt;
                &amp;lt;/tr&amp;gt;
                &amp;lt;tr&amp;gt;
                    &amp;lt;td &amp;gt;&amp;lt;input type="checkbox" name="country_id" class="checkboxes" value="10" &amp;gt;&amp;lt;/td&amp;gt;
                    &amp;lt;td &amp;gt; Item-6 &amp;lt;/td&amp;gt;
                &amp;lt;/tr&amp;gt;

            &amp;lt;/table&amp;gt;

    &amp;lt;/div&amp;gt;
&amp;lt;/div&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;
&amp;lt;script type="text/javascript"&amp;gt;
    $(document).ready(function () {

        //To Check all checkbox
        $(".chk_all").click(function () {

            var checkAll = $(".chk_all").prop('checked');
            if (checkAll) {
                $(".checkboxes").prop("checked", true);
            } else {
                $(".checkboxes").prop("checked", false);
            }

        });

        // if all checkbox are selected, check the chk_all checkbox
        $(".checkboxes").click(function ()
        {
            if($(".checkboxes").length==$(".subscheked:checked").length)
            {
                $(".chk_all").attr("checked", "checked");
            }
            else
            {
                $(".chk_all").removeAttr("checked");
            }
        });

    });
&amp;lt;/script&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt; &lt;b&gt;CSS:&lt;/b&gt; &lt;/p&gt;
&lt;pre&gt;&lt;code&gt;html, body {
   margin:0;
   padding:0;
   height:100%;
}
body {
    border: 0;
    color: #000;
}

#body{
    width: 500px;
    margin: 0 auto;
    max-width: 100%;
    padding:20px 0 70px 0;
    height: 100%;
}

#container {
   min-height:100%;
   position:relative;
}

.header{
    font-size: 25px;
    text-align: center;
    background-color: #d0dafd;
}
table {
    *border-collapse: collapse;
    border-spacing: 5px;
    width: 100%;
}

.bordered {
    border: solid darkgoldenrod 3px;
    box-shadow: 0 1px 1px darkgoldenrod;
}

.bordered td {
    padding: 10px;
    border-bottom: 2px solid #d0dafd;

}
.bordered th {
    padding: 10px;
    border-bottom: 2px solid darkgoldenrod;
    background-color: #eee;
    border-top: none;
    text-align:center;
}

.bordered tbody tr:nth-child(even) {
    background: #eeeeee;
    border:1px solid #000;

}
.bordered tbody tr:hover td {
    background: #d0dafd;
    color: #FF0000;
}
tr td {
    text-align: center;
}&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt; &lt;b&gt;Conclusion:&lt;/b&gt; &lt;/p&gt;
&lt;p&gt; Thanks for reading. &lt;/p&gt;
&lt;p&gt; Do let me know If you face any difficulties please feel free to comment below we love to help you. if you have any feedback suggestions then please inform us by commenting. &lt;/p&gt;
&lt;p&gt; Don’t forget to share this tutorial with your friends on &lt;a href="https://www.facebook.com/TutsCoder" rel="noopener noreferrer"&gt;Facebook&lt;/a&gt; and &lt;a href="https://twitter.com/tutscoder" rel="noopener noreferrer"&gt;Twitter&lt;/a&gt;. &lt;/p&gt;

</description>
      <category>javascript</category>
      <category>jquery</category>
      <category>tutorial</category>
      <category>howto</category>
    </item>
    <item>
      <title>3 Easy Steps for Setting up React Native Development Environment</title>
      <dc:creator>TutsCoder</dc:creator>
      <pubDate>Fri, 10 Feb 2023 05:59:29 +0000</pubDate>
      <link>https://dev.to/dev14/3-easy-steps-for-setting-up-react-native-development-environment-2871</link>
      <guid>https://dev.to/dev14/3-easy-steps-for-setting-up-react-native-development-environment-2871</guid>
      <description>&lt;p&gt; One of the top cross-platform Interface frameworks for
developers in 2022 is undoubtedly &lt;b&gt;React Native&lt;/b&gt;. It was introduced by Meta early
in 2015 and is now the best-known UI framework supporting cross-platform
development.  &lt;/p&gt;
&lt;p&gt; We can create apps with React Native for almost every known
mobile, web, and Smart TV operating system, spanning Android, iOS, macOS,
Android TV, tvOS, and Windows. Going to set up the &lt;a href="https://www.4waytechnologies.com/react-native-app-development" rel="noopener noreferrer"&gt;React Native Development&lt;/a&gt; Environment
ought to be the initial stage of your project, regardless of the platform you
are developing on.  &lt;/p&gt;
&lt;p&gt; We will discuss how to set up the React Native Development
Environment for Windows in this article.  &lt;/p&gt;
&lt;p&gt; It can also be configured in iOS, but
we'll learn how to do it in a future blog post. &lt;/p&gt;
&lt;h2&gt;Why is a development environment necessary?&lt;/h2&gt;
&lt;p&gt; Before deploying our codes, we need to construct and edit
them locally in a development environment. This gives programmers a significant
deal of freedom and flexibility. &lt;/p&gt;
&lt;p&gt; Simply said, a development environment is a work area where
we conduct development. A development environment is often made up of many
resources and services that help us create the program or write the code for
the application we want. This help can take many different forms and typically
includes everything we would require when coding for our projects. &lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The majority of development environments have built-in
debugging and patching facilities.&lt;/li&gt;
&lt;li&gt;They frequently help with activities related to maintaining and updating our codes.
&lt;/li&gt;
&lt;li&gt;Integrated Development Environments, or IDEs, give us a synchronized interface to inspect our programs as we build them. This is how we typically work today.
&lt;/li&gt;
&lt;li&gt; For developers, the entire development process—writing, testing, and packaging—is greatly simplified.
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt; It is crucial to remember that development environments
might be toolkit environments or single-language settings.   &lt;/p&gt;
&lt;p&gt; Knowing that React Native is supposed to be a
framework that supports several different languages, it should come as no
surprise that we use toolkit environments when developing on React Native. &lt;/p&gt;
&lt;h2&gt;React Native Development Environment Setup&lt;/h2&gt;
&lt;p&gt; When developing for React Native, we typically use the Expo
CLI or React Native CLI in conjunction with Android Studio as well as XCode.
 &lt;/p&gt;
&lt;p&gt; You are free to utilize any of these for the projects you work on, but if
you're unsure which is best for you, my article may be able to help. &lt;/p&gt;
&lt;h3&gt;Expo Snack&lt;/h3&gt;
&lt;p&gt; Snack is a browser-based programming environment for React
Native Development, or as its creators like to refer to it, a playground.
That's true, you don't need to set up any IDEs, customize them, install CLIs,
or start off totally committed to React Native. You may easily start developing
any React Native project by going to the Snack web environment. It is ideal for
both novices and senior citizens who want to experiment a little. You can
simply create, debug, and bundle your codes thanks to it. &lt;/p&gt;
&lt;p&gt; But we're here on a more serious journey. We'll talk about
how to set up a React Native development environment on your system. There are
two options, one of which is simpler. Let's explore those! &lt;/p&gt;
&lt;h3&gt;Expo Go&lt;/h3&gt;
&lt;p&gt; If you are new to mobile development, Expo Go is suggested
for starting up a React Native development environment for creating mobile user
interfaces. As we will discover in a moment, setting up Expo Go is pretty
simple. A number of helpful features that are based on React Native are
included with Expo Go. All that is required to establish Expo Go is one
emulator as well as the latest edition of Node.js, and you should be all set. &lt;/p&gt;
&lt;p&gt; Let's make a "&lt;b&gt;MyfirstProject&lt;/b&gt;" React Native project
in Expo Go! &lt;/p&gt;
&lt;p&gt; You can quickly launch a development server if you're using
npm by: &lt;/p&gt;
&lt;pre&gt;&lt;code&gt;npx create-expo-app MyfirstProject 
cd MyfirstProject
npm start 
# you can also use: npx expo start
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt; For launching this development
server using yarn:  &lt;/p&gt;
&lt;pre&gt;&lt;code&gt;yarn create expo-app MyfirstProject
cd MyfirstProject
yarn start 
# you can also use: yarn expo start
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Problems with Expo Go&lt;/h2&gt;
&lt;p&gt; Expo Go makes it simple to begin working on a new React
Native project, but it comes with a number of limitations that will ultimately
limit your ability to code in React Native. &lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;It forbids the use of native codes.
&lt;/li&gt;
&lt;li&gt; In Expo Go, a number of Android and iOS APIs might not be available.
&lt;/li&gt;
&lt;li&gt;Not always appropriate when you intend to create lightweight apps.
&lt;/li&gt;
&lt;li&gt;Your free builds may occasionally become queued in Expo Go.
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt; In light of these, it would be sager to learn how to set up
a React Native development environment in your system using the React Native
CLI. Let’s get to it. &lt;/p&gt;
&lt;h3&gt;React Native CLI&lt;/h3&gt;
&lt;p&gt; Compared to Expo, setting up React Native CLI is only
slightly more difficult because it needs XCode or Android Studio.  &lt;/p&gt;
&lt;p&gt; If you have
experience with mobile development, setting up and using React Native CLI
should be a breeze for you.  &lt;/p&gt;
&lt;p&gt; It would take some time to install and set up any
of the IDEs when you are a newbie and also do not already have XCode or Android
Studio installed. This can be a little intimidating, especially if you're just
starting. &lt;/p&gt;
&lt;p&gt; As we will be creating a development environment for
projects targeted at Android OS, we will be using Android Studio for these
demonstrations. It's crucial to remember that the setup procedures vary
slightly depending on the Development OS. The instructions for Windows will be
covered in this blog. &lt;/p&gt;
&lt;h3&gt;Step 1 - Installing Dependency&lt;/h3&gt;
&lt;p&gt; You would also require Node.js, the Java SE Development Kit
(JDK), plus Android Studio to be installed in addition to React Native CLI.
Using the well-known Windows package manager Chocolatey, you would have to
install the LTS version of Node. However, it would be preferable to install
Node using the Node version of Windows manager, nvm-windows, if you are going
to swap between LTS and other versions of Node. To install JDK using Chocolatey:
 &lt;/p&gt;
&lt;pre&gt;&lt;code&gt;choco install -y nodejs-lts openjdk11&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Step 2 - Installing Android SDK in Android Studio&lt;/h3&gt;
&lt;p&gt; Given the number of stages, establishing the development
environment may seem a little challenging. Installing and configuring Android
Studio is required to create the development environment. React Native requires
the Android 12 (S) SDK which can be installed from the SDK Manager in Android
Studio. Also, you have to ensure that 31.0.0 is opted for under the Android SDK
Build-tools in the SDK Tools tab. &lt;/p&gt;
&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fres.cloudinary.com%2Fdvo6eiftd%2Fimage%2Fupload%2Fv1662993655%2Fvsswezjm6pxx3b0yhawc.jpg" alt="Android-Studio"&gt;Android-Studio&lt;h3&gt;Step 3 - Configuring ANDROID_HOME &lt;/h3&gt;
&lt;p&gt; An environment variable called ANDROID HOME is required to
use React Native. To set this up from the Windows Control Panel, go to User
Accounts and select Change my environment variable. Now you can click
"New…" to establish a new user variable called ANDROID_HOME that
points to your Android SDK path. &lt;/p&gt;
&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fres.cloudinary.com%2Fdvo6eiftd%2Fimage%2Fupload%2Fv1662993665%2Flxvcsxzuoydfjb2izmqq.jpg" alt="Configure-Android-home"&gt;Configure-Android-home&lt;p&gt; Android Studio is now fully set up. Simply use the npx react-native
&amp;lt;command&amp;gt; to run React Native CLI to finish setting up your
development environment. &lt;/p&gt;
&lt;p&gt; You are now prepared to launch a new React Native project on
Windows! Use the following command to start a new project:  &lt;/p&gt;
&lt;pre&gt;&lt;code&gt;npx react-native init MyfirstProject&lt;/code&gt;&lt;/pre&gt;
&lt;h4&gt;Wrapping up&lt;/h4&gt;
&lt;p&gt; Now that you've hopefully successfully installed the React
Native Development Environment and even launched your first React Native
Project on your computer.  &lt;/p&gt;
&lt;p&gt; Run my first project is all that remains to be done!
To run applications, React Native leverages Metro, a JavaScript bundler that is
included with it. To learn how to launch and execute your React Native
applications using the Metro Bundler, refer to the Metro Docs. Additionally,
the React Native Team's Integration Guide may be useful to you if you wish to
integrate your newly created React Native code within an already existing
application. If not, feel free to return here for another in-depth discussion
of these! &lt;/p&gt;

</description>
      <category>reactnative</category>
    </item>
    <item>
      <title>How to get current location in Angular 14+</title>
      <dc:creator>TutsCoder</dc:creator>
      <pubDate>Thu, 02 Feb 2023 10:59:46 +0000</pubDate>
      <link>https://dev.to/dev14/how-to-get-current-location-in-angular-14-i35</link>
      <guid>https://dev.to/dev14/how-to-get-current-location-in-angular-14-i35</guid>
      <description>&lt;p&gt; In this article, we will see how to get the user's current location in Angular 14+. &lt;/p&gt;
&lt;p&gt; Generate location service &lt;/p&gt;
&lt;pre&gt;&lt;code&gt;ng g service services/location/location&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt; It will create location service inside services folder &lt;/p&gt;
&lt;p&gt; Now add below code in it &lt;/p&gt;
&lt;pre&gt;&lt;code&gt;import { Injectable } from '@angular/core';

@Injectable({
  providedIn: 'root',
})
export class LocationService {
  constructor() {}

  getCurrentLocation() {
    return new Promise((resolve, reject) =&amp;gt; {
      if (navigator.geolocation) {
        navigator.geolocation.getCurrentPosition(
          (position) =&amp;gt; {
            if (position) {
              console.log(
                'Latitude: ' +
                  position.coords.latitude +
                  'Longitude: ' +
                  position.coords.longitude
              );
              let lat = position.coords.latitude;
              let lng = position.coords.longitude;

              const location = {
                lat,
                lng,
              };
              resolve(location);
            }
          },
          (error) =&amp;gt; console.log(error)
        );
      } else {
        reject('Geolocation is not supported by this browser.');
      }
    });
  }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt; Now use this location service in app.component.ts file as below: &lt;/p&gt;
&lt;pre&gt;&lt;code&gt; const position: any = await this.locationService.getCurrentLocation();
 console.log(position);&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt; You will get the current latitude and longitude on the console. &lt;/p&gt;

</description>
      <category>angular</category>
    </item>
    <item>
      <title>How to show Google map in Angular 14+</title>
      <dc:creator>TutsCoder</dc:creator>
      <pubDate>Thu, 02 Feb 2023 10:59:30 +0000</pubDate>
      <link>https://dev.to/dev14/how-to-show-google-map-in-angular-14-2b07</link>
      <guid>https://dev.to/dev14/how-to-show-google-map-in-angular-14-2b07</guid>
      <description>&lt;p&gt; In this article, we will learn how to show Google Map using javascript API step by step. &lt;/p&gt;
&lt;h2&gt;Show Google map in Angular 14+&lt;/h2&gt;
&lt;p&gt; Create a New map component &lt;/p&gt;
&lt;pre&gt;&lt;code&gt;ng g c map&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt; Update map.component.html &lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;div class="map" #map&amp;gt;&amp;lt;/div&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt; Generate Google Maps service &lt;/p&gt;
&lt;pre&gt;&lt;code&gt;ng g service services/google-maps/google-maps&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt; It will Create &lt;b&gt;google-maps&lt;/b&gt; service inside the services folder. &lt;/p&gt;
&lt;p&gt; Now replace this code with&lt;code&gt; google-maps.service.ts&lt;/code&gt;  &lt;/p&gt;
&lt;pre&gt;&lt;code&gt;import { Injectable } from '@angular/core';
import { environment } from 'src/environments/environment';

@Injectable({
  providedIn: 'root',
})
export class GoogleMapsService {
  constructor() {}

  loadGoogleMaps(): Promise&amp;lt;any&amp;gt; {
    const win = window as any;
    const gModule = win.google;
    if (gModule &amp;amp;&amp;amp; gModule.maps) {
      return Promise.resolve(gModule.maps);
    }

    return new Promise((resolve, reject) =&amp;gt; {
      const script = document.createElement('script');
      script.src =
        'https://maps.googleapis.com/maps/api/js?key=' +
        environment.googleMapsApiKey +
        '&amp;amp;libraries=places';
      script.async = true;
      script.defer = true;
      document.body.appendChild(script);

      script.onload = () =&amp;gt; {
        const loadedGoogleModule = win.google;
        if (loadedGoogleModule &amp;amp;&amp;amp; loadedGoogleModule.maps) {
          resolve(loadedGoogleModule.maps);
        } else {
          reject('Google Map SDK is not Available');
        }
      };
    });
  }

}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt; Then update &lt;code&gt;map.component.ts&lt;/code&gt; &lt;/p&gt;
&lt;pre&gt;&lt;code&gt;import {
  AfterViewInit,
  Component,
  ElementRef,
  EventEmitter,
  Input,
  OnInit,
  Output,
  Renderer2,
  ViewChild,
} from '@angular/core';
import { GoogleMapsService } from 'src/app/services/google-maps/google-maps.service';

@Component({
  selector: 'app-map',
  templateUrl: './map.component.html',
  styleUrls: ['./map.component.scss'],
})
export class MapComponent implements OnInit, AfterViewInit {
  @ViewChild('map', { static: true }) mapElementRef: ElementRef;
  googleMaps: any;
  map: any;
  center = { lat: 23.01997577399075, lng: 73.07245691797758 };
  
  constructor(
    private maps: GoogleMapsService,
    private renderer: Renderer2
  ) {}

  ngOnInit(): void {}
  ngAfterViewInit() {
    this.loadMap();
  }

  async loadMap() {
    try {
      let googleMaps: any = await this.maps.loadGoogleMaps();
      this.googleMaps = googleMaps;
      const mapEl = this.mapElementRef.nativeElement;

      const location = new googleMaps.LatLng(this.center.lat, this.center.lng);
      this.map = new googleMaps.Map(mapEl, {
        center: location,
        zoom: 15,
        scaleControl: false,
        streetViewControl: false,
        zoomControl: false,
        overviewMapControl: false,
        mapTypeControl: false,
        mapTypeControlOptions: {
          mapTypeIds: [googleMaps.MapTypeId.ROADMAP, 'mapId'],
        },
      });
      const style = [
        {
          featureType: 'all',
          elementType: 'all',
          stylers: [{ saturation: -100 }],
        },
      ];

      var mapType = new googleMaps.StyledMapType(style, { name: 'Grayscale' });
      this.map.mapTypes.set('mapId', mapType);
      this.map.setMapTypeId('mapId');
      this.renderer.addClass(mapEl, 'visible');
    } catch (e) {
      console.log(e);
    }
  }

}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt; Now update &lt;code&gt;map.component.scss&lt;/code&gt; &lt;/p&gt;
&lt;pre&gt;&lt;code&gt;.map {
    height: 30vh;
    width: 100%;
    background-color: transparent;
}
.map.visible {
  opacity: 1;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt; Now your map will be visible on browser &lt;/p&gt;
&lt;h2&gt;How to add a Marker in Google Maps?&lt;/h2&gt;
&lt;p&gt; Add the addMarker function as below in &lt;code&gt;map.componenets.ts&lt;/code&gt; as below: &lt;/p&gt;
&lt;pre&gt;&lt;code&gt;  addMarker(location) {
    let googleMaps: any = this.googleMaps;
    const icon = {
      url: 'assets/icons/location-pin.png',
      scaledSize: new googleMaps.Size(50, 50),
    };
    this.marker = new googleMaps.Marker({
      position: location,
      map: this.map,
      icon: icon,
      draggable: true,
      animation: googleMaps.Animation.DROP,
    });
  }&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt; Then call this function at bottom of loadMap function &lt;/p&gt;
&lt;pre&gt;&lt;code&gt;this.addMarker(location);&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt; Now you can also see the marker on the map at the center position. &lt;/p&gt;

</description>
      <category>angular</category>
    </item>
    <item>
      <title>How to create a Google Maps API key for Website</title>
      <dc:creator>TutsCoder</dc:creator>
      <pubDate>Thu, 02 Feb 2023 10:59:16 +0000</pubDate>
      <link>https://dev.to/dev14/how-to-create-a-google-maps-api-key-for-website-am8</link>
      <guid>https://dev.to/dev14/how-to-create-a-google-maps-api-key-for-website-am8</guid>
      <description>&lt;p&gt; In this article, we will learn how to create a Google Maps API key for your website, which you can use to show google Maps on your website. &lt;/p&gt;
&lt;h2&gt;What is a Google Maps API key?&lt;/h2&gt;
&lt;p&gt; An individual code supplied by Google to access Google Maps on website is known as a Google Maps API key.  &lt;/p&gt;
&lt;p&gt; You receive a certain number of &lt;b&gt;free Google Map queries&lt;/b&gt; using your API key.  &lt;/p&gt;
&lt;p&gt; In order to access google maps, we need to have google map API connected to our App and to do that we need to follow a certain process. &lt;/p&gt;
&lt;h3&gt;Create a Google Maps API key step by step:&lt;/h3&gt;
&lt;p&gt; 1. Go to &lt;a href="https://cloud.google.com/maps-platform/" rel="noopener noreferrer"&gt;Google Maps Platform&lt;/a&gt; and Sign up or log in with your existing with your Google account &lt;/p&gt;
&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--_qD0-RFu--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://res.cloudinary.com/dvo6eiftd/image/upload/v1662474473/apx4djp59360wmwnkbiw.jpg" alt="Google-map-Started" width="800" height="253"&gt;Google-map-Started&lt;p&gt; 2. Enable billing for your project  &lt;/p&gt;
&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--dwcz-sIb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://res.cloudinary.com/dvo6eiftd/image/upload/v1662470245/j8ffoxr18pe2songpg1e.jpg" alt="Enable-Billing-Alert" width="800" height="398"&gt;Enable-Billing-Alert&lt;p&gt; Give your billing project a name, then click Continue. Your contact information and payment details should be entered into the form. Choose &lt;b&gt;Next.&lt;/b&gt; &lt;/p&gt;
&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--kRvlE-7x--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://res.cloudinary.com/dvo6eiftd/image/upload/v1662470352/gpc7j8jytycxtpvxro9g.jpg" alt="Create-Billing-Account-Form" width="800" height="626"&gt;Create-Billing-Account-Form&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--CVzO4ZWO--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://res.cloudinary.com/dvo6eiftd/image/upload/v1662470529/avakqcltfrxhsegui5oa.jpg" alt="Payments-Profile" width="800" height="875"&gt;Payments-Profile&lt;p&gt; 3. Create New Project &lt;/p&gt;
&lt;p&gt; Please choose an existing project from the list if you wish to use one. If not, choose "Create a new project" and provide an  appropriate project name. &lt;/p&gt;
&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--UkR9G4tI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://res.cloudinary.com/dvo6eiftd/image/upload/v1662470699/jdpmzyysjpgih25cief7.jpg" alt="Create-New-Project" width="800" height="621"&gt;Create-New-Project&lt;p&gt; 4. Create Your API and Enable Javascript API &lt;/p&gt;
&lt;p&gt; Now from Dashboard select &lt;b&gt;'API and Services' &lt;/b&gt;from Quick Access menu. &lt;/p&gt;
&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--3Oi-o8v4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://res.cloudinary.com/dvo6eiftd/image/upload/v1662470861/nudyeocssxklwmjznuch.jpg" alt="Project-Dashboard" width="800" height="429"&gt;Project-Dashboard&lt;p&gt; Then Select &lt;b&gt;Maps Javascript API &lt;/b&gt;from the list  &lt;/p&gt;
&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--4JRUcbtS--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://res.cloudinary.com/dvo6eiftd/image/upload/v1662470981/sfqw7dnjt3ffagzawe9j.jpg" alt="Maps-Javascript-API" width="800" height="161"&gt;Maps-Javascript-API&lt;p&gt; Now Enable Javascript API &lt;/p&gt;
&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--uK_PQqJE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://res.cloudinary.com/dvo6eiftd/image/upload/v1662471131/tso1dwlbxbe2rykuhwoy.jpg" alt="Enable-Javascript-API" width="800" height="739"&gt;Enable-Javascript-API&lt;p&gt; Your API key will be displayed in a new window for you. Press Save the key so you can use it, then click Done. &lt;/p&gt;
&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--YeMx7HgL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://res.cloudinary.com/dvo6eiftd/image/upload/v1662471260/mbswn2od7ean5akfnypw.jpg" alt="Generate-API-Key" width="800" height="311"&gt;Generate-API-Key 
&lt;span&gt;👉Note: &lt;/span&gt; 
&lt;p&gt;Any usage that goes over your allotted amount will be immediately charged to your Google account.&lt;/p&gt;


&lt;h2&gt;Billing Model:&lt;/h2&gt;
&lt;p&gt; You only pay for what you use while using Google Maps, Routes, and Places, as well as the associated APIs (Maps JavaScript API, Directions API, Timezone API, and Geocoding API).  &lt;/p&gt;
&lt;p&gt; You can establish usage limitations to guard against unforeseen cost rises, and you receive a regular $200 credit on your billing account each month to offset your usage charges. &lt;/p&gt;

</description>
      <category>webdev</category>
    </item>
    <item>
      <title>How to get address location from latitude and longitude in Angular15+</title>
      <dc:creator>TutsCoder</dc:creator>
      <pubDate>Thu, 02 Feb 2023 10:57:18 +0000</pubDate>
      <link>https://dev.to/dev14/how-to-get-address-location-from-latitude-and-longitude-in-angular15-45ed</link>
      <guid>https://dev.to/dev14/how-to-get-address-location-from-latitude-and-longitude-in-angular15-45ed</guid>
      <description>&lt;p&gt; In this article, we will see how we can get address location from latitude and longitude in Angular15+ by using the Reverse Geocoding technique. &lt;/p&gt;
&lt;h2&gt;What is Reverse Geocoding?&lt;/h2&gt;
&lt;p&gt; &lt;b&gt;Reverse geocoding &lt;/b&gt;is the process to convert the latitude and longitude coordinates to a readable address. &lt;/p&gt;
&lt;h3&gt;How to Get address location from latitude and longitude in Angular15+&lt;/h3&gt;
&lt;p&gt; Generate map componenent  &lt;/p&gt;
&lt;pre&gt;&lt;code&gt;ng g c map&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt; getAddress(lat: number, lng: number): Promise&amp;lt;any&amp;gt; {&lt;br&gt;&lt;br&gt;
    return new Promise((resolve, reject) =&amp;gt; {&lt;br&gt;&lt;br&gt;
      this.http&lt;br&gt;&lt;br&gt;
        .get&amp;lt;any&amp;gt;(&lt;br&gt;&lt;br&gt;
          &lt;code&gt;&lt;a href="https://maps.googleapis.com/maps/api/geocode/json?latlng=$%7Blat%7D,$%7Blng%7D&amp;amp;amp;key=$%7Benvironment.googleMapsApiKey%7D" rel="noopener noreferrer"&gt;https://maps.googleapis.com/maps/api/geocode/json?latlng=${lat},${lng}&amp;amp;amp;amp;key=${environment.googleMapsApiKey}&lt;/a&gt;&lt;/code&gt;&lt;br&gt;&lt;br&gt;
        )&lt;br&gt;&lt;br&gt;
        .pipe(&lt;br&gt;&lt;br&gt;
          map((geoData) =&amp;gt; {&lt;br&gt;&lt;br&gt;
            if (!geoData || !geoData.results || geoData.results.length === 0)&lt;br&gt;&lt;br&gt;
              throw null;&lt;br&gt;&lt;br&gt;
            return geoData.results[0];&lt;br&gt;&lt;br&gt;
          })&lt;br&gt;&lt;br&gt;
        )&lt;br&gt;&lt;br&gt;
        .subscribe(&lt;br&gt;&lt;br&gt;
          (data) =&amp;gt; {&lt;br&gt;&lt;br&gt;
            resolve(data);&lt;br&gt;&lt;br&gt;
          },&lt;br&gt;&lt;br&gt;
          (e) =&amp;gt; {&lt;br&gt;&lt;br&gt;
            reject(e);&lt;br&gt;&lt;br&gt;
          }&lt;br&gt;&lt;br&gt;
        );&lt;br&gt;&lt;br&gt;
    });&lt;br&gt;&lt;br&gt;
  }&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt; and now use this function as below: &lt;/p&gt;
&lt;pre&gt;&lt;code&gt;this.getAddress(23.01997577399075, 73.07245691797758);&lt;/code&gt;&lt;/pre&gt;

</description>
      <category>angular</category>
      <category>location</category>
      <category>howto</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
