Category: Angular

  • How to create mobile applications with Angular and Cordova?

    How to create mobile applications with Angular and Cordova?

    Creating mobile applications using Angular and Cordova involves a combination of web development skills and understanding of mobile development frameworks. Angular provides a robust framework for building dynamic web applications, while Cordova allows these applications to be packaged as mobile apps accessible on iOS and Android devices. Here’s a step-by-step guide to get you started:

    1. Setting Up the Development Environment

    • Install Node.js: Ensure you have Node.js installed on your system as it includes npm (Node Package Manager) which is necessary for managing the libraries and tools you’ll need.
    • Install Angular CLI: Use npm to install the Angular CLI (Command Line Interface) globally on your computer. This tool is essential for creating, developing, managing, and testing Angular applications. Run npm install -g @angular/cli in your terminal.
    • Install Cordova: Similarly, install Cordova globally using npm with npm install -g cordova.

    2. Creating an Angular Project

    • Generate a New Angular Project: Use the Angular CLI to create a new project by running ng new your-project-name. Follow the prompts to set up your Angular app.
    • Develop Your Application: Build your Angular application using the wide array of tools and components available in the framework. You can serve your application locally using ng serve to see live changes.

    3. Adding Cordova to Your Project

    • Initialize Cordova: Navigate to your project directory in the terminal and run cordova create cordova. This command sets up Cordova in your project, creating a cordova folder where the mobile-specific resources and configurations will reside.
    • Add Platforms: You need to add each platform you intend to support. Run commands like cordova platform add android or cordova platform add ios within the cordova directory of your project. Note that adding iOS platform requires a macOS environment.

    4. Integrating Angular with Cordova

    • Build Your Angular Application: Before integrating with Cordova, build your Angular application by running ng build --prod. This command compiles your app into a dist/your-project-name folder.
    • Configure Cordova: Copy the contents of your Angular dist/your-project-name folder into the www folder inside your Cordova project directory. This step might vary depending on your project’s specific structure and build process.
    • Cordova Configuration and Plugins: Edit config.xml in your Cordova project to adjust app preferences like name, description, and permissions. Install any Cordova plugins you need for accessing native device features using cordova plugin add plugin-name.

    5. Building and Running Your Mobile App

    • Build for Platforms: Use Cordova CLI to build your app for targeted platforms. Run cordova build android or cordova build ios within your Cordova directory.
    • Run on Devices or Emulators: Deploy your application to connected devices or emulators by running cordova run android or cordova run ios. Ensure you have the appropriate SDKs and development tools installed for each platform.

    Tips and Best Practices

    • Testing on Real Devices: Testing on actual devices can provide insights into the performance and user experience that emulators cannot.
    • Use Angular-Cordova Integration Plugins: Look for plugins or npm packages designed to streamline the integration of Angular with Cordova, reducing manual configuration steps.
    • Stay Updated: Both Angular and Cordova are actively developed frameworks. Keep your project dependencies up to date to take advantage of new features and improvements.

    This guide provides a foundation for starting mobile app development with Angular and Cordova. As you progress, you’ll likely encounter more specific requirements and challenges that require deeper dives into the documentation and community forums for both Angular and Cordova.

  • Angular 17 Lazy Loading Demo

    Angular 17 Lazy Loading Demo

    To create a simple demonstration of lazy loading with Angular 17, let’s walk through the steps to set up a new Angular project, create a couple of feature modules, and configure them for lazy loading. This process involves creating separate modules for different parts of your application and then loading them on demand. Here’s a basic walkthrough:

    1. Setting up a New Angular Project

    First, ensure you have the Angular CLI installed. If not, you can install it globally on your system via npm:

    npm install -g @angular/cli

    Then, create a new Angular project:

    ng new angular-lazy-loading-demo

    Navigate to your project directory:

    cd angular-lazy-loading-demo

    2. Generating Feature Modules

    For this demo, let’s create two feature modules, HomeModule and AboutModule, which we’ll load lazily.

    Run these commands in your terminal:

    ng generate module Home --route home --module app.module
    ng generate module About --route about --module app.module

    These commands do two things: they generate the modules and configure the routes in the app-routing.module.ts to load the modules lazily.

    3. Understanding the Configuration

    After running the commands, if you open the app-routing.module.ts, you should see something like this:

    const routes: Routes = [
      { path: 'home', loadChildren: () => import('./home/home.module').then(m => m.HomeModule) },
      { path: 'about', loadChildren: () => import('./about/about.module').then(m => m.AboutModule) },
      { path: '', redirectTo: '/home', pathMatch: 'full' },
    ];

    This configuration defines routes for home and about, specifying that these modules should be loaded lazily with the loadChildren syntax.

    4. Adding Components to Modules

    For each module, you might want to generate a component:

    ng generate component Home/Home --module=Home
    ng generate component About/About --module=About

    And then, ensure each module’s routing (home-routing.module.ts and about-routing.module.ts) is set up to display these components. For example, home-routing.module.ts might look like:

    const routes: Routes = [
      { path: '', component: HomeComponent },
    ];

    5. Running the Application

    Finally, serve your application:

    ng serve

    Navigate to http://localhost:4200/ in your browser. You should be able to switch between the Home and About sections, with each module being loaded lazily as you navigate.

    Conclusion

    This basic example sets up lazy loading for two feature modules in an Angular 17 application. Angular’s lazy loading helps in loading feature modules lazily, which can significantly improve the initial load time of your application by splitting the final bundle into smaller chunks and loading them on demand.

  • Angular 17 Micro Frontend Demo

    Angular 17 Micro Frontend Demo

    Implementing micro frontends with Angular 17 involves creating multiple, independently deployable frontend applications (micro frontends) that can be composed into a larger application. Each micro frontend can be developed, tested, and deployed independently, allowing for greater flexibility and scalability in large projects.

    The basic strategy to achieve this with Angular involves:

    1. Creating separate Angular projects for each micro frontend.
    2. Using a container application to load and display these micro frontends.
    3. Communicating between micro frontends and the container app, if necessary.

    Below is a simplified code example to demonstrate how you might set up a basic micro frontend architecture using Angular 17. This example assumes you have basic knowledge of Angular and its CLI.

    Step 1: Create the Container Application

    First, you’ll create the container application which will act as the host for the micro frontends.

    ng new container-app --routing=true --style=scss

    In the container app, you might use Angular’s Router to dynamically load micro frontends based on the route.

    Step 2: Create Micro Frontend Applications

    Create separate Angular projects for each micro frontend. For example:

    ng new micro-frontend-1 --routing=true --style=scss
    ng new micro-frontend-2 --routing=true --style=scss

    Step 3: Build and Serve Micro Frontends

    You’ll need to build each micro frontend and serve it, possibly from a distinct base URL. For simplification, we’ll assume static deployment.

    ng build --prod --output-hashing=none

    You might serve these builds from different paths on a web server, or use Angular’s development server for testing.

    Step 4: Load Micro Frontends in the Container App

    In the container app, you can dynamically load micro frontends using iframes, Web Components, or JavaScript. A simple approach is to dynamically set the src of an iframe based on the route.

    Container App app.component.html example:

    <iframe [src]="microFrontendUrl" frameborder="0"></iframe>

    Container App app.component.ts example:

    import { Component } from '@angular/core';
    
    @Component({
      selector: 'app-root',
      templateUrl: './app.component.html',
      styleUrls: ['./app.component.scss']
    })
    export class AppComponent {
      microFrontendUrl: string;
    
      constructor() {
        this.microFrontendUrl = this.getMicroFrontendUrl(window.location.pathname);
      }
    
      getMicroFrontendUrl(path: string): string {
        switch (path) {
          case '/micro-frontend-1':
            return 'http://localhost:4201'; // URL where micro-frontend-1 is served
          case '/micro-frontend-2':
            return 'http://localhost:4202'; // URL where micro-frontend-2 is served
          default:
            return '';
        }
      }
    }

    Step 5: Communicating Between Micro Frontends and the Container

    Communication between the container and micro frontends can be achieved through various mechanisms, such as Custom Events, Shared Libraries, or even leveraging the Angular framework itself if you embed micro frontends more natively.

    Note:

    This is a simplified explanation and code example to get you started with micro frontends in Angular. Depending on your requirements, you might need to explore more sophisticated approaches, such as using Module Federation with Webpack (available from Angular 11 onwards), which allows for more dynamic loading of micro frontends without iframes and can share dependencies between them.

  • Angular 17 karma Jasmine Testing Demo

    Angular 17 karma Jasmine Testing Demo

    Testing in Angular applications is an important part of the development process, ensuring that your application behaves as expected and helping to catch bugs early. Angular 17, like its predecessors, supports unit and integration testing with a variety of tools, with Jasmine and Karma being the primary choices for many developers. Jasmine is a behavior-driven development framework for testing JavaScript code, and Karma is a test runner that executes tests in multiple real browsers.

    Here’s a basic demo on how to set up and write a simple test case using Jasmine and Karma in an Angular 17 project. This will cover setting up your testing environment and writing a simple test for a component.

    Step 1: Setting Up Your Angular Project

    First, ensure you have Angular CLI installed. If not, you can install it via npm:

    npm install -g @angular/cli

    Create a new Angular project if you don’t already have one:

    ng new angular-jasmine-demo

    Navigate into your project directory:

    cd angular-jasmine-demo

    Angular CLI sets up Jasmine and Karma by default when creating a new project, so you should have all the necessary files and configurations for testing.

    Step 2: Writing a Simple Test

    Let’s say you have a simple component called AppComponent in your project. Angular CLI generates a default test file for this component located at src/app/app.component.spec.ts. We’ll modify this file to write a simple test.

    Open src/app/app.component.spec.ts and ensure it looks something like this:

    import { TestBed } from '@angular/core/testing';
    import { AppComponent } from './app.component';
    
    describe('AppComponent', () => {
    
      beforeEach(async () => {
        await TestBed.configureTestingModule({
          declarations: [
            AppComponent
          ],
        }).compileComponents();
      });
    
      it('should create the app', () => {
        const fixture = TestBed.createComponent(AppComponent);
        const app = fixture.componentInstance;
        expect(app).toBeTruthy();
      });
    
      it(`should have as title 'angular-jasmine-demo'`, () => {
        const fixture = TestBed.createComponent(AppComponent);
        const app = fixture.componentInstance;
        expect(app.title).toEqual('angular-jasmine-demo');
      });
    
      // Add more tests here
    });

    Step 3: Running Your Tests

    Run your tests using the Angular CLI:

    ng test

    This command starts Karma, and it will open a browser window to run the tests. You will see the test results in the terminal where you ran the command. If everything is set up correctly, the tests defined in app.component.spec.ts should pass.

    Conclusion

    This simple demo shows how to set up and write basic tests for an Angular component using Jasmine and Karma. For real-world applications, you would typically write many more tests covering different aspects of your components and services, including tests for asynchronous behavior, component interaction, and service mocks.

  • Creating a chat application using Angular 17 and Socket.IO

    Creating a chat application using Angular 17 and Socket.IO

    Creating a chat application using Angular 17 and Socket.IO involves several steps, including setting up an Angular project, integrating Socket.IO, and building the frontend and backend for real-time communication. Here’s a simplified outline to guide you through the process:

    1. Set Up Angular Project

    First, you need to set up your Angular project. Assuming you have Node.js and npm installed, you can use the Angular CLI.

    npm install -g @angular/cli
    ng new chat-app
    cd chat-app

    2. Install Socket.IO

    You’ll need to install Socket.IO for both the client (Angular) and server (Node.js).

    • For the Angular client:
      npm install socket.io-client
    • For the Node.js server:
      npm install socket.io express

    3. Create the Node.js Server

    Create a simple Express server with Socket.IO integrated.

    • Create a new file for your server, e.g., server.js.
    • Set up the server:
      const express = require('express');
      const http = require('http');
      const socketIo = require('socket.io');
    
      const app = express();
      const server = http.createServer(app);
      const io = socketIo(server);
    
      io.on('connection', (socket) => {
        console.log('New client connected');
    
        socket.on('disconnect', () => {
          console.log('Client disconnected');
        });
    
        socket.on('message', (message) => {
          io.emit('message', message);
        });
      });
    
      server.listen(3000, () => {
        console.log('Listening on port 3000');
      });

    4. Set Up the Angular Service for Socket.IO

    Create a service in Angular to handle Socket.IO communications.

    • Generate a new service:
      ng generate service chat
    • In your chat.service.ts, set up methods to connect to the server, send messages, and listen for incoming messages.
      import { Injectable } from '@angular/core';
      import * as io from 'socket.io-client';
      import { Observable } from 'rxjs';
    
      @Injectable({
        providedIn: 'root'
      })
      export class ChatService {
        private socket = io('http://localhost:3000');
    
        sendMessage(message: string): void {
          this.socket.emit('message', message);
        }
    
        getMessages(): Observable<string> {
          return new Observable((observer) => {
            this.socket.on('message', (message) => {
              observer.next(message);
            });
          });
        }
      }

    5. Build the Chat Interface

    Create the chat components in Angular.

    • Generate a new component:
      ng generate component chat
    • Implement the chat interface in chat.component.html and use the ChatService to send and receive messages in chat.component.ts.

    6. Run the Application

    • Start the Node.js server:
      node server.js
    • Serve the Angular application:
      ng serve

    7. Test the Application

    Open the application in multiple browsers or tabs and test the real-time chat functionality.

    Additional Tips

    • Ensure CORS issues are handled if your client and server are on different domains.
    • Implement additional features like user authentication, typing indicators, and message history.

    This outline provides a basic framework. You might need to adjust the code and configurations based on your specific requirements and Angular version nuances.

  • Building an e-commerce website using Angular 17

    Building an e-commerce website using Angular 17

    Building an e-commerce website using Angular 17 involves several steps, from setting up your development environment to deploying the final product. Here’s a high-level overview of the process:

    1. Setting Up the Development Environment

    • Install Node.js and npm: Angular requires Node.js and npm (Node Package Manager). Download and install them from the official Node.js website.
    • Install Angular CLI: Angular CLI (Command Line Interface) is a tool to initialize, develop, scaffold, and maintain Angular applications. Install it globally using npm:
      npm install -g @angular/cli

    2. Initialize the Angular Project

    • Create a New Angular Project: Use Angular CLI to create a new project:
      ng new my-ecommerce-project

    Follow the prompts to set up the project.

    3. Structure Your Application

    • Design the Application Structure: Plan the layout and components you’ll need. Common components for an e-commerce site include:
    • Product List
    • Product Details
    • Shopping Cart
    • Checkout Form
    • Generate Components: Use Angular CLI to generate new components:
      ng generate component component-name

    4. Develop the Frontend

    • Implement Routing: Set up Angular routing to navigate between different components.
    • Create Templates and Styling: Use HTML and CSS to design your templates. Angular supports various styling approaches like plain CSS, SCSS, or inline styles.
    • Bind Data with Services: Use Angular services to manage and bind data to your components.

    5. Backend Integration

    • Choose a Backend: Decide whether to use a pre-built e-commerce backend (like Firebase, Magento, or a custom backend).
    • API Integration: Use Angular’s HttpClient module to interact with the backend API for fetching products, handling carts, processing orders, etc.

    6. Add E-commerce Functionalities

    • Shopping Cart: Implement logic to add, remove, or update items in the cart.
    • Payment Gateway Integration: Integrate a payment system (like PayPal, Stripe) for processing payments.

    7. Testing

    • Unit Testing: Write unit tests for your components and services using Jasmine and Karma.
    • End-to-End Testing: Use tools like Protractor for end-to-end testing.

    8. Optimization and Best Practices

    • Optimize Performance: Implement lazy loading, track component performance, and optimize bundle sizes.
    • Follow Best Practices: Adhere to Angular’s best practices for coding standards, folder structure, and component communication.

    9. Deployment

    • Build for Production: Use Angular CLI to build your project for production:
      ng build --prod
    • Deploy: Choose a hosting platform (like AWS, Firebase Hosting, Netlify) and deploy your app.

    10. Maintain and Update

    • Regularly update your application with new features, security patches, and performance improvements.

    Documentation and Learning Resources

    • Angular Official Documentation: Refer to Angular’s official documentation for detailed guidance.
    • Online Courses: Platforms like Udemy, Coursera, and Pluralsight offer courses on Angular.
    • Community and Forums: Engage with the Angular community on platforms like Stack Overflow, GitHub, or Reddit for support and advice.

    Remember, building an e-commerce site is a complex task that involves front-end and back-end development, security considerations, payment processing, and more. It’s important to plan thoroughly and possibly consult with or hire professionals if you’re not experienced in certain areas.

  • Migrate Angular templates to the new syntax introduced to Angular 17 Efficiently

    Migrate Angular templates to the new syntax introduced to Angular 17 Efficiently

    Hello friends, welcome back to my blog. Today in this blog post, I am going to show you, Migrate Angular templates to the new syntax introduced to Angular 17 Efficiently.

    Guys as you know in Angular 17 we can have different syntax for ngIf, ngFor and so on. Am looking for an efficient way of migrating old syntax in html files to the new on presented in Angular 17:

    For example I had this old html in Angular 15:

    <ng-container *ngIf="!dynamicWidth; else FlexibleRef">
      <div class="c-title"></div>
      <div class="c-desc c-desc__short"></div>
      <div class="c-desc c-desc__long"></div>
    </ng-container>
    
    <ng-template #FlexibleRef>
      <div
        *ngFor="let item of count | numberRange; let i = index"
        [ngStyle]="{ width: (100 / count) * (i + 1) + '%' }"
        class="flexible-desc"></div>
    </ng-template>

    And need it in the new syntax like this:

    @if (!dynamicWidth) {
      <div class="c-title"></div>
      <div class="c-desc c-desc__short"></div>
      <div class="c-desc c-desc__long"></div>
    } @else { 
        @for (item of count | numberRange; track item; let i = $index) {
          <div [ngStyle]="{ width: (100 / count) * (i + 1) + '%' }" class="flexible-desc">. </div>
       } 
    }

    So guys to overcome this issue I found below trick:

    • If you’re using the Angular CLI, you can run ng g @angular/core:control-flow
    • If using Nx, you can run nx generate @angular/core:control-flow-migration

    Now we are done friends and please run ng serve command and if you have any kind of query then please do comment below.

    I will appreciate that if you will tell your views for this post. Nothing matters if your views will be good or bad.

    Thanks

    Jassa

  • Angular 17 AdminLTE 3 Admin Dashboard Free Template

    Angular 17 AdminLTE 3 Admin Dashboard Free Template

    Hello to all, welcome back to blog. Today in this blog post, I am going to show you, Angular 17 AdminLTE 3 Admin Dashboard Free Template.

    Live Demo

    Angular17 came and if you are new then you must check below two links:

    1. Angular 17 Basic Tutorials
    2. Angular Free Templates
    Responsive Admin Dashboard
    Responsive Admin Dashboard

    Friends now I proceed onwards and here is the working code snippet and use this carefully to avoid the mistakes:

    1. Firstly friends we need fresh angular 17 setup and for this we need to run below commands but if you already have angular 17 setup then you can avoid below commands. Secondly we should also have latest node version installed on our system:

    Guys you can skip this first step if you already have angular 17 fresh setup:

    npm install -g @angular/cli 
    
    ng new angularadmindashboard //Create new Angular Project
    
    cd angularadmindashboard  // Go inside the Angular Project Folder
    
    ng serve --open // Run and Open the Angular Project
    
    http://localhost:4200/ // Working Angular Project Url

    2. Now friends, please download zip(in this zip file there are js, css for angular admin template) file from below path and extract zip and please put all the zip file folders in “src/assets” folder(which we will get from zip file):

    Github repo

    3. Now friends please add below code into src/index.html file:

    ...
    <head>
    ...
    <!-- Font Awesome -->
       <link rel="stylesheet" href="assets/plugins/fontawesome-free/css/all.min.css">
       <!-- Ionicons -->
       <link rel="stylesheet" href="https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css">
       <!-- Tempusdominus Bbootstrap 4 -->
       <link rel="stylesheet" href="assets/plugins/tempusdominus-bootstrap-4/css/tempusdominus-bootstrap-4.min.css">
       <!-- iCheck -->
       <link rel="stylesheet" href="assets/plugins/icheck-bootstrap/icheck-bootstrap.min.css">
       <!-- JQVMap -->
       <link rel="stylesheet" href="assets/plugins/jqvmap/jqvmap.min.css">
       <!-- Theme style -->
       <link rel="stylesheet" href="assets/dist/css/adminlte.min.css">
       <!-- overlayScrollbars -->
       <link rel="stylesheet" href="assets/plugins/overlayScrollbars/css/OverlayScrollbars.min.css">
       <!-- Daterange picker -->
       <link rel="stylesheet" href="assets/plugins/daterangepicker/daterangepicker.css">
       <!-- summernote -->
       <link rel="stylesheet" href="assets/plugins/summernote/summernote-bs4.css">
       <!-- Google Font: Source Sans Pro -->
       <link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,700" rel="stylesheet">
    <script src="assets/plugins/jquery/jquery.min.js"></script>
    <!-- jQuery UI 1.11.4 -->
    <script src="assets/plugins/jquery-ui/jquery-ui.min.js"></script>
    <!-- Resolve conflict in jQuery UI tooltip with Bootstrap tooltip -->
    <script>
      $.widget.bridge('uibutton', $.ui.button)
    </script>
    <!-- Bootstrap 4 -->
    <script src="assets/plugins/bootstrap/js/bootstrap.bundle.min.js"></script>
    <!-- ChartJS -->
    <script src="assets/plugins/chart.js/Chart.min.js"></script>
    <!-- Sparkline -->
    <script src="assets/plugins/sparklines/sparkline.js"></script>
    <!-- JQVMap -->
    <script src="assets/plugins/jqvmap/jquery.vmap.min.js"></script>
    <script src="assets/plugins/jqvmap/maps/jquery.vmap.usa.js"></script>
    <!-- jQuery Knob Chart -->
    <script src="assets/plugins/jquery-knob/jquery.knob.min.js"></script>
    <!-- daterangepicker -->
    <script src="assets/plugins/moment/moment.min.js"></script>
    <script src="assets/plugins/daterangepicker/daterangepicker.js"></script>
    <!-- Tempusdominus Bootstrap 4 -->
    <script src="assets/plugins/tempusdominus-bootstrap-4/js/tempusdominus-bootstrap-4.min.js"></script>
    <!-- Summernote -->
    <script src="assets/plugins/summernote/summernote-bs4.min.js"></script>
    <!-- overlayScrollbars -->
    <script src="assets/plugins/overlayScrollbars/js/jquery.overlayScrollbars.min.js"></script>
    <!-- AdminLTE App -->
    <script src="assets/dist/js/adminlte.js"></script>
    <!-- AdminLTE dashboard demo (This is only for demo purposes) -->
    <script src="assets/dist/js/pages/dashboard.js"></script>
    <!-- AdminLTE for demo purposes -->
    <script src="assets/dist/js/demo.js"></script>
    </head>
    <body class="hold-transition sidebar-mini layout-fixed">
    ...

    4. Now friends we need to add below code into src/app/app.component.html file:

    <div class="wrapper">
    <!-- Navbar -->
    <nav class="main-header navbar navbar-expand navbar-white navbar-light">
        <!-- Left navbar links -->
        <ul class="navbar-nav">
          <li class="nav-item">
            <a class="nav-link" data-widget="pushmenu" href="#" role="button"><i class="fas fa-bars"></i></a>
          </li>
        </ul>
    
        <!-- SEARCH FORM -->
        <form class="form-inline ml-3">
          <div class="input-group input-group-sm">
            <input class="form-control form-control-navbar" type="search" placeholder="Search" aria-label="Search">
            <div class="input-group-append">
              <button class="btn btn-navbar" type="submit">
                <i class="fas fa-search"></i>
              </button>
            </div>
          </div>
        </form>
    
        <!-- Right navbar links -->
        <ul class="navbar-nav ml-auto">
          <!-- Messages Dropdown Menu -->
          <li class="nav-item dropdown">
            <a class="nav-link" data-toggle="dropdown" href="#">
              <i class="far fa-comments"></i>
              <span class="badge badge-danger navbar-badge">3</span>
            </a>
            <div class="dropdown-menu dropdown-menu-lg dropdown-menu-right">
              <a href="#" class="dropdown-item">
                <!-- Message Start -->
                <div class="media">
                  <img src="assets/dist/img/user1-128x128.jpg" alt="User Avatar" class="img-size-50 mr-3 img-circle">
                  <div class="media-body">
                    <h3 class="dropdown-item-title">
                      Brad Diesel
                      <span class="float-right text-sm text-danger"><i class="fas fa-star"></i></span>
                    </h3>
                    <p class="text-sm">Call me whenever you can...</p>
                    <p class="text-sm text-muted"><i class="far fa-clock mr-1"></i> 4 Hours Ago</p>
                  </div>
                </div>
                <!-- Message End -->
              </a>
              <div class="dropdown-divider"></div>
              <a href="#" class="dropdown-item">
                <!-- Message Start -->
                <div class="media">
                  <img src="assets/dist/img/user8-128x128.jpg" alt="User Avatar" class="img-size-50 img-circle mr-3">
                  <div class="media-body">
                    <h3 class="dropdown-item-title">
                      John Pierce
                      <span class="float-right text-sm text-muted"><i class="fas fa-star"></i></span>
                    </h3>
                    <p class="text-sm">I got your message bro</p>
                    <p class="text-sm text-muted"><i class="far fa-clock mr-1"></i> 4 Hours Ago</p>
                  </div>
                </div>
                <!-- Message End -->
              </a>
              <div class="dropdown-divider"></div>
              <a href="#" class="dropdown-item">
                <!-- Message Start -->
                <div class="media">
                  <img src="assets/dist/img/user3-128x128.jpg" alt="User Avatar" class="img-size-50 img-circle mr-3">
                  <div class="media-body">
                    <h3 class="dropdown-item-title">
                      Nora Silvester
                      <span class="float-right text-sm text-warning"><i class="fas fa-star"></i></span>
                    </h3>
                    <p class="text-sm">The subject goes here</p>
                    <p class="text-sm text-muted"><i class="far fa-clock mr-1"></i> 4 Hours Ago</p>
                  </div>
                </div>
                <!-- Message End -->
              </a>
              <div class="dropdown-divider"></div>
              <a href="#" class="dropdown-item dropdown-footer">See All Messages</a>
            </div>
          </li>
          <!-- Notifications Dropdown Menu -->
          <li class="nav-item dropdown">
            <a class="nav-link" data-toggle="dropdown" href="#">
              <i class="far fa-bell"></i>
              <span class="badge badge-warning navbar-badge">15</span>
            </a>
            <div class="dropdown-menu dropdown-menu-lg dropdown-menu-right">
              <span class="dropdown-item dropdown-header">15 Notifications</span>
              <div class="dropdown-divider"></div>
              <a href="#" class="dropdown-item">
                <i class="fas fa-envelope mr-2"></i> 4 new messages
                <span class="float-right text-muted text-sm">3 mins</span>
              </a>
              <div class="dropdown-divider"></div>
              <a href="#" class="dropdown-item">
                <i class="fas fa-users mr-2"></i> 8 friend requests
                <span class="float-right text-muted text-sm">12 hours</span>
              </a>
              <div class="dropdown-divider"></div>
              <a href="#" class="dropdown-item">
                <i class="fas fa-file mr-2"></i> 3 new reports
                <span class="float-right text-muted text-sm">2 days</span>
              </a>
              <div class="dropdown-divider"></div>
              <a href="#" class="dropdown-item dropdown-footer">See All Notifications</a>
            </div>
          </li>
        </ul>
      </nav>
      <!-- /.navbar -->
    
      <!-- Main Sidebar Container -->
      <aside class="main-sidebar sidebar-dark-primary elevation-4">
        <!-- Brand Logo -->
        <a href="#" class="brand-link">
          <img src="assets/dist/img/AdminLTELogo.png" alt="AdminLTE Logo" class="brand-image img-circle elevation-3"
               style="opacity: .8">
          <span class="brand-text font-weight-light">AdminLTE 3</span>
        </a>
    
        <!-- Sidebar -->
        <div class="sidebar">
          <!-- Sidebar user panel (optional) -->
          <div class="user-panel mt-3 pb-3 mb-3 d-flex">
            <div class="image">
              <img src="assets/dist/img/user2-160x160.jpg" class="img-circle elevation-2" alt="User Image">
            </div>
            <div class="info">
              <a href="#" class="d-block">Admin</a>
            </div>
          </div>
    
          <!-- Sidebar Menu -->
          <nav class="mt-2">
            <ul class="nav nav-pills nav-sidebar flex-column" data-widget="treeview" role="menu" data-accordion="false">
              <!-- Add icons to the links using the .nav-icon class
                   with font-awesome or any other icon font library -->
              <li class="nav-item has-treeview menu-open">
                <a href="#" class="nav-link active">
                  <i class="nav-icon fas fa-tachometer-alt"></i>
                  <p>
                    Dashboard
                    <i class="right fas fa-angle-left"></i>
                  </p>
                </a>
                <ul class="nav nav-treeview">
                  <li class="nav-item">
                    <a href="#" class="nav-link active">
                      <i class="far fa-circle nav-icon"></i>
                      <p>Dashboard v1</p>
                    </a>
                  </li>
                
                </ul>
              </li>
              <li class="nav-item has-treeview">
                <a href="#" class="nav-link">
                  <i class="nav-icon fas fa-book"></i>
                  <p>
                    Pages
                    <i class="fas fa-angle-left right"></i>
                  </p>
                </a>
                <ul class="nav nav-treeview">
                  <li class="nav-item">
                    <a href="#" class="nav-link">
                      <i class="far fa-circle nav-icon"></i>
                      <p>Invoice</p>
                    </a>
                  </li>
                  <li class="nav-item">
                    <a href="#" class="nav-link">
                      <i class="far fa-circle nav-icon"></i>
                      <p>Profile</p>
                    </a>
                  </li>
                  <li class="nav-item">
                    <a href="#" class="nav-link">
                      <i class="far fa-circle nav-icon"></i>
                      <p>E-commerce</p>
                    </a>
                  </li>
                  <li class="nav-item">
                    <a href="#" class="nav-link">
                      <i class="far fa-circle nav-icon"></i>
                      <p>Projects</p>
                    </a>
                  </li>
                  <li class="nav-item">
                    <a href="#" class="nav-link">
                      <i class="far fa-circle nav-icon"></i>
                      <p>Project Add</p>
                    </a>
                  </li>
                  <li class="nav-item">
                    <a href="#" class="nav-link">
                      <i class="far fa-circle nav-icon"></i>
                      <p>Project Edit</p>
                    </a>
                  </li>
                  <li class="nav-item">
                    <a href="#" class="nav-link">
                      <i class="far fa-circle nav-icon"></i>
                      <p>Project Detail</p>
                    </a>
                  </li>
                  <li class="nav-item">
                    <a href="#" class="nav-link">
                      <i class="far fa-circle nav-icon"></i>
                      <p>Contacts</p>
                    </a>
                  </li>
                </ul>
              </li>
            </ul>
          </nav>
          <!-- /.sidebar-menu -->
        </div>
        <!-- /.sidebar -->
      </aside>
    
      <!-- Content Wrapper. Contains page content -->
      <div class="content-wrapper">
        <!-- Content Header (Page header) -->
        <div class="content-header">
          <div class="container-fluid">
            <div class="row mb-2">
              <div class="col-sm-6">
                <h1 class="m-0 text-dark">Dashboard</h1>
              </div><!-- /.col -->
              <div class="col-sm-6">
                <ol class="breadcrumb float-sm-right">
                  <li class="breadcrumb-item"><a href="#">Home</a></li>
                  <li class="breadcrumb-item active">Dashboard</li>
                </ol>
              </div><!-- /.col -->
            </div><!-- /.row -->
          </div><!-- /.container-fluid -->
        </div>
        <!-- /.content-header -->
    
        <!-- Main content -->
        <section class="content">
          <div class="container-fluid">
            <!-- Small boxes (Stat box) -->
            <div class="row">
              <div class="col-lg-3 col-6">
                <!-- small box -->
                <div class="small-box bg-info">
                  <div class="inner">
                    <h3>150</h3>
    
                    <p>New Orders</p>
                  </div>
                  <div class="icon">
                    <i class="ion ion-bag"></i>
                  </div>
                  <a href="#" class="small-box-footer">More info <i class="fas fa-arrow-circle-right"></i></a>
                </div>
              </div>
              <!-- ./col -->
              <div class="col-lg-3 col-6">
                <!-- small box -->
                <div class="small-box bg-success">
                  <div class="inner">
                    <h3>53<sup style="font-size: 20px">%</sup></h3>
    
                    <p>Bounce Rate</p>
                  </div>
                  <div class="icon">
                    <i class="ion ion-stats-bars"></i>
                  </div>
                  <a href="#" class="small-box-footer">More info <i class="fas fa-arrow-circle-right"></i></a>
                </div>
              </div>
              <!-- ./col -->
              <div class="col-lg-3 col-6">
                <!-- small box -->
                <div class="small-box bg-warning">
                  <div class="inner">
                    <h3>44</h3>
    
                    <p>User Registrations</p>
                  </div>
                  <div class="icon">
                    <i class="ion ion-person-add"></i>
                  </div>
                  <a href="#" class="small-box-footer">More info <i class="fas fa-arrow-circle-right"></i></a>
                </div>
              </div>
              <!-- ./col -->
              <div class="col-lg-3 col-6">
                <!-- small box -->
                <div class="small-box bg-danger">
                  <div class="inner">
                    <h3>65</h3>
    
                    <p>Unique Visitors</p>
                  </div>
                  <div class="icon">
                    <i class="ion ion-pie-graph"></i>
                  </div>
                  <a href="#" class="small-box-footer">More info <i class="fas fa-arrow-circle-right"></i></a>
                </div>
              </div>
              <!-- ./col -->
            </div>
            <!-- /.row -->
            <!-- Main row -->
            <div class="row">
              <!-- Left col -->
              <section class="col-lg-7 connectedSortable">
                <!-- Custom tabs (Charts with tabs)-->
                <div class="card">
                  <div class="card-header">
                    <h3 class="card-title">
                      <i class="fas fa-chart-pie mr-1"></i>
                      Sales
                    </h3>
                    <div class="card-tools">
                      <ul class="nav nav-pills ml-auto">
                        <li class="nav-item">
                          <a class="nav-link active" href="#revenue-chart" data-toggle="tab">Area</a>
                        </li>
                        <li class="nav-item">
                          <a class="nav-link" href="#sales-chart" data-toggle="tab">Donut</a>
                        </li>
                      </ul>
                    </div>
                  </div><!-- /.card-header -->
                  <div class="card-body">
                    <div class="tab-content p-0">
                      <!-- Morris chart - Sales -->
                      <div class="chart tab-pane active" id="revenue-chart"
                           style="position: relative; height: 300px;">
                          <canvas id="revenue-chart-canvas" height="300" style="height: 300px;"></canvas>                         
                       </div>
                      <div class="chart tab-pane" id="sales-chart" style="position: relative; height: 300px;">
                        <canvas id="sales-chart-canvas" height="300" style="height: 300px;"></canvas>                         
                      </div>  
                    </div>
                  </div><!-- /.card-body -->
                </div>
                <!-- /.card -->
    
                <!-- DIRECT CHAT -->
                <div class="card direct-chat direct-chat-primary">
                  <div class="card-header">
                    <h3 class="card-title">Direct Chat</h3>
    
                    <div class="card-tools">
                      <span data-toggle="tooltip" title="3 New Messages" class="badge badge-primary">3</span>
                      <button type="button" class="btn btn-tool" data-card-widget="collapse">
                        <i class="fas fa-minus"></i>
                      </button>
                      <button type="button" class="btn btn-tool" data-toggle="tooltip" title="Contacts"
                              data-widget="chat-pane-toggle">
                        <i class="fas fa-comments"></i>
                      </button>
                      <button type="button" class="btn btn-tool" data-card-widget="remove"><i class="fas fa-times"></i>
                      </button>
                    </div>
                  </div>
                  <!-- /.card-header -->
                  <div class="card-body">
                    <!-- Conversations are loaded here -->
                    <div class="direct-chat-messages">
                      <!-- Message. Default to the left -->
                      <div class="direct-chat-msg">
                        <div class="direct-chat-infos clearfix">
                          <span class="direct-chat-name float-left">Alexander Pierce</span>
                          <span class="direct-chat-timestamp float-right">23 Jan 2:00 pm</span>
                        </div>
                        <!-- /.direct-chat-infos -->
                        <img class="direct-chat-img" src="assets/dist/img/user1-128x128.jpg" alt="message user image">
                        <!-- /.direct-chat-img -->
                        <div class="direct-chat-text">
                          Is this template really for free? That's unbelievable!
                        </div>
                        <!-- /.direct-chat-text -->
                      </div>
                      <!-- /.direct-chat-msg -->
    
                      <!-- Message to the right -->
                      <div class="direct-chat-msg right">
                        <div class="direct-chat-infos clearfix">
                          <span class="direct-chat-name float-right">Sarah Bullock</span>
                          <span class="direct-chat-timestamp float-left">23 Jan 2:05 pm</span>
                        </div>
                        <!-- /.direct-chat-infos -->
                        <img class="direct-chat-img" src="assets/dist/img/user3-128x128.jpg" alt="message user image">
                        <!-- /.direct-chat-img -->
                        <div class="direct-chat-text">
                          You better believe it!
                        </div>
                        <!-- /.direct-chat-text -->
                      </div>
                      <!-- /.direct-chat-msg -->
    
                      <!-- Message. Default to the left -->
                      <div class="direct-chat-msg">
                        <div class="direct-chat-infos clearfix">
                          <span class="direct-chat-name float-left">Alexander Pierce</span>
                          <span class="direct-chat-timestamp float-right">23 Jan 5:37 pm</span>
                        </div>
                        <!-- /.direct-chat-infos -->
                        <img class="direct-chat-img" src="assets/dist/img/user1-128x128.jpg" alt="message user image">
                        <!-- /.direct-chat-img -->
                        <div class="direct-chat-text">
                          Working with AdminLTE on a great new app! Wanna join?
                        </div>
                        <!-- /.direct-chat-text -->
                      </div>
                      <!-- /.direct-chat-msg -->
    
                      <!-- Message to the right -->
                      <div class="direct-chat-msg right">
                        <div class="direct-chat-infos clearfix">
                          <span class="direct-chat-name float-right">Sarah Bullock</span>
                          <span class="direct-chat-timestamp float-left">23 Jan 6:10 pm</span>
                        </div>
                        <!-- /.direct-chat-infos -->
                        <img class="direct-chat-img" src="assets/dist/img/user3-128x128.jpg" alt="message user image">
                        <!-- /.direct-chat-img -->
                        <div class="direct-chat-text">
                          I would love to.
                        </div>
                        <!-- /.direct-chat-text -->
                      </div>
                      <!-- /.direct-chat-msg -->
    
                    </div>
                    <!--/.direct-chat-messages-->
    
                    <!-- Contacts are loaded here -->
                    <div class="direct-chat-contacts">
                      <ul class="contacts-list">
                        <li>
                          <a href="#">
                            <img class="contacts-list-img" src="assets/dist/img/user1-128x128.jpg">
    
                            <div class="contacts-list-info">
                              <span class="contacts-list-name">
                                Count Dracula
                                <small class="contacts-list-date float-right">2/28/2015</small>
                              </span>
                              <span class="contacts-list-msg">How have you been? I was...</span>
                            </div>
                            <!-- /.contacts-list-info -->
                          </a>
                        </li>
                        <!-- End Contact Item -->
                        <li>
                          <a href="#">
                            <img class="contacts-list-img" src="assets/dist/img/user7-128x128.jpg">
    
                            <div class="contacts-list-info">
                              <span class="contacts-list-name">
                                Sarah Doe
                                <small class="contacts-list-date float-right">2/23/2015</small>
                              </span>
                              <span class="contacts-list-msg">I will be waiting for...</span>
                            </div>
                            <!-- /.contacts-list-info -->
                          </a>
                        </li>
                        <!-- End Contact Item -->
                        <li>
                          <a href="#">
                            <img class="contacts-list-img" src="assets/dist/img/user3-128x128.jpg">
    
                            <div class="contacts-list-info">
                              <span class="contacts-list-name">
                                Nadia Jolie
                                <small class="contacts-list-date float-right">2/20/2015</small>
                              </span>
                              <span class="contacts-list-msg">I'll call you back at...</span>
                            </div>
                            <!-- /.contacts-list-info -->
                          </a>
                        </li>
                        <!-- End Contact Item -->
                        <li>
                          <a href="#">
                            <img class="contacts-list-img" src="assets/dist/img/user5-128x128.jpg">
    
                            <div class="contacts-list-info">
                              <span class="contacts-list-name">
                                Nora S. Vans
                                <small class="contacts-list-date float-right">2/10/2015</small>
                              </span>
                              <span class="contacts-list-msg">Where is your new...</span>
                            </div>
                            <!-- /.contacts-list-info -->
                          </a>
                        </li>
                        <!-- End Contact Item -->
                        <li>
                          <a href="#">
                            <img class="contacts-list-img" src="assets/dist/img/user6-128x128.jpg">
    
                            <div class="contacts-list-info">
                              <span class="contacts-list-name">
                                John K.
                                <small class="contacts-list-date float-right">1/27/2015</small>
                              </span>
                              <span class="contacts-list-msg">Can I take a look at...</span>
                            </div>
                            <!-- /.contacts-list-info -->
                          </a>
                        </li>
                        <!-- End Contact Item -->
                        <li>
                          <a href="#">
                            <img class="contacts-list-img" src="assets/dist/img/user8-128x128.jpg">
    
                            <div class="contacts-list-info">
                              <span class="contacts-list-name">
                                Kenneth M.
                                <small class="contacts-list-date float-right">1/4/2015</small>
                              </span>
                              <span class="contacts-list-msg">Never mind I found...</span>
                            </div>
                            <!-- /.contacts-list-info -->
                          </a>
                        </li>
                        <!-- End Contact Item -->
                      </ul>
                      <!-- /.contacts-list -->
                    </div>
                    <!-- /.direct-chat-pane -->
                  </div>
                  <!-- /.card-body -->
                  <div class="card-footer">
                    <form action="#" method="post">
                      <div class="input-group">
                        <input type="text" name="message" placeholder="Type Message ..." class="form-control">
                        <span class="input-group-append">
                          <button type="button" class="btn btn-primary">Send</button>
                        </span>
                      </div>
                    </form>
                  </div>
                  <!-- /.card-footer-->
                </div>
                <!--/.direct-chat -->
    
                <!-- TO DO List -->
                <div class="card">
                  <div class="card-header">
                    <h3 class="card-title">
                      <i class="ion ion-clipboard mr-1"></i>
                      To Do List
                    </h3>
    
                    <div class="card-tools">
                      <ul class="pagination pagination-sm">
                        <li class="page-item"><a href="#" class="page-link">&laquo;</a></li>
                        <li class="page-item"><a href="#" class="page-link">1</a></li>
                        <li class="page-item"><a href="#" class="page-link">2</a></li>
                        <li class="page-item"><a href="#" class="page-link">3</a></li>
                        <li class="page-item"><a href="#" class="page-link">&raquo;</a></li>
                      </ul>
                    </div>
                  </div>
                  <!-- /.card-header -->
                  <div class="card-body">
                    <ul class="todo-list" data-widget="todo-list">
                      <li>
                        <!-- drag handle -->
                        <span class="handle">
                          <i class="fas fa-ellipsis-v"></i>
                          <i class="fas fa-ellipsis-v"></i>
                        </span>
                        <!-- checkbox -->
                        <div  class="icheck-primary d-inline ml-2">
                          <input type="checkbox" value="" name="todo1" id="todoCheck1">
                          <label for="todoCheck1"></label>
                        </div>
                        <!-- todo text -->
                        <span class="text">Design a nice theme</span>
                        <!-- Emphasis label -->
                        <small class="badge badge-danger"><i class="far fa-clock"></i> 2 mins</small>
                        <!-- General tools such as edit or delete-->
                        <div class="tools">
                          <i class="fas fa-edit"></i>
                          <i class="fas fa-trash-o"></i>
                        </div>
                      </li>
                      <li>
                        <span class="handle">
                          <i class="fas fa-ellipsis-v"></i>
                          <i class="fas fa-ellipsis-v"></i>
                        </span>
                        <div  class="icheck-primary d-inline ml-2">
                          <input type="checkbox" value="" name="todo2" id="todoCheck2" checked>
                          <label for="todoCheck2"></label>
                        </div>
                        <span class="text">Make the theme responsive</span>
                        <small class="badge badge-info"><i class="far fa-clock"></i> 4 hours</small>
                        <div class="tools">
                          <i class="fas fa-edit"></i>
                          <i class="fas fa-trash-o"></i>
                        </div>
                      </li>
                      <li>
                        <span class="handle">
                          <i class="fas fa-ellipsis-v"></i>
                          <i class="fas fa-ellipsis-v"></i>
                        </span>
                        <div  class="icheck-primary d-inline ml-2">
                          <input type="checkbox" value="" name="todo3" id="todoCheck3">
                          <label for="todoCheck3"></label>
                        </div>
                        <span class="text">Let theme shine like a star</span>
                        <small class="badge badge-warning"><i class="far fa-clock"></i> 1 day</small>
                        <div class="tools">
                          <i class="fas fa-edit"></i>
                          <i class="fas fa-trash-o"></i>
                        </div>
                      </li>
                      <li>
                        <span class="handle">
                          <i class="fas fa-ellipsis-v"></i>
                          <i class="fas fa-ellipsis-v"></i>
                        </span>
                        <div  class="icheck-primary d-inline ml-2">
                          <input type="checkbox" value="" name="todo4" id="todoCheck4">
                          <label for="todoCheck4"></label>
                        </div>
                        <span class="text">Let theme shine like a star</span>
                        <small class="badge badge-success"><i class="far fa-clock"></i> 3 days</small>
                        <div class="tools">
                          <i class="fas fa-edit"></i>
                          <i class="fas fa-trash-o"></i>
                        </div>
                      </li>
                      <li>
                        <span class="handle">
                          <i class="fas fa-ellipsis-v"></i>
                          <i class="fas fa-ellipsis-v"></i>
                        </span>
                        <div  class="icheck-primary d-inline ml-2">
                          <input type="checkbox" value="" name="todo5" id="todoCheck5">
                          <label for="todoCheck5"></label>
                        </div>
                        <span class="text">Check your messages and notifications</span>
                        <small class="badge badge-primary"><i class="far fa-clock"></i> 1 week</small>
                        <div class="tools">
                          <i class="fas fa-edit"></i>
                          <i class="fas fa-trash-o"></i>
                        </div>
                      </li>
                      <li>
                        <span class="handle">
                          <i class="fas fa-ellipsis-v"></i>
                          <i class="fas fa-ellipsis-v"></i>
                        </span>
                        <div  class="icheck-primary d-inline ml-2">
                          <input type="checkbox" value="" name="todo6" id="todoCheck6">
                          <label for="todoCheck6"></label>
                        </div>
                        <span class="text">Let theme shine like a star</span>
                        <small class="badge badge-secondary"><i class="far fa-clock"></i> 1 month</small>
                        <div class="tools">
                          <i class="fas fa-edit"></i>
                          <i class="fas fa-trash-o"></i>
                        </div>
                      </li>
                    </ul>
                  </div>
                  <!-- /.card-body -->
                  <div class="card-footer clearfix">
                    <button type="button" class="btn btn-info float-right"><i class="fas fa-plus"></i> Add item</button>
                  </div>
                </div>
                <!-- /.card -->
              </section>
              <!-- /.Left col -->
              <!-- right col (We are only adding the ID to make the widgets sortable)-->
              <section class="col-lg-5 connectedSortable">
    
                <!-- Map card -->
                <div class="card bg-gradient-primary">
                  <div class="card-header border-0">
                    <h3 class="card-title">
                      <i class="fas fa-map-marker-alt mr-1"></i>
                      Visitors
                    </h3>
                    <!-- card tools -->
                    <div class="card-tools">
                      <button type="button"
                              class="btn btn-primary btn-sm daterange"
                              data-toggle="tooltip"
                              title="Date range">
                        <i class="far fa-calendar-alt"></i>
                      </button>
                      <button type="button"
                              class="btn btn-primary btn-sm"
                              data-card-widget="collapse"
                              data-toggle="tooltip"
                              title="Collapse">
                        <i class="fas fa-minus"></i>
                      </button>
                    </div>
                    <!-- /.card-tools -->
                  </div>
                  <div class="card-body">
                    <div id="world-map" style="height: 250px; width: 100%;"></div>
                  </div>
                  <!-- /.card-body-->
                  <div class="card-footer bg-transparent">
                    <div class="row">
                      <div class="col-4 text-center">
                        <div id="sparkline-1"></div>
                        <div class="text-white">Visitors</div>
                      </div>
                      <!-- ./col -->
                      <div class="col-4 text-center">
                        <div id="sparkline-2"></div>
                        <div class="text-white">Online</div>
                      </div>
                      <!-- ./col -->
                      <div class="col-4 text-center">
                        <div id="sparkline-3"></div>
                        <div class="text-white">Sales</div>
                      </div>
                      <!-- ./col -->
                    </div>
                    <!-- /.row -->
                  </div>
                </div>
                <!-- /.card -->
    
                <!-- solid sales graph -->
                <div class="card bg-gradient-info">
                  <div class="card-header border-0">
                    <h3 class="card-title">
                      <i class="fas fa-th mr-1"></i>
                      Sales Graph
                    </h3>
    
                    <div class="card-tools">
                      <button type="button" class="btn bg-info btn-sm" data-card-widget="collapse">
                        <i class="fas fa-minus"></i>
                      </button>
                      <button type="button" class="btn bg-info btn-sm" data-card-widget="remove">
                        <i class="fas fa-times"></i>
                      </button>
                    </div>
                  </div>
                  <div class="card-body">
                    <canvas class="chart" id="line-chart" style="min-height: 250px; height: 250px; max-height: 250px; max-width: 100%;"></canvas>
                  </div>
                  <!-- /.card-body -->
                  <div class="card-footer bg-transparent">
                    <div class="row">
                      <div class="col-4 text-center">
                        <input type="text" class="knob" data-readonly="true" value="20" data-width="60" data-height="60"
                               data-fgColor="#39CCCC">
    
                        <div class="text-white">Mail-Orders</div>
                      </div>
                      <!-- ./col -->
                      <div class="col-4 text-center">
                        <input type="text" class="knob" data-readonly="true" value="50" data-width="60" data-height="60"
                               data-fgColor="#39CCCC">
    
                        <div class="text-white">Online</div>
                      </div>
                      <!-- ./col -->
                      <div class="col-4 text-center">
                        <input type="text" class="knob" data-readonly="true" value="30" data-width="60" data-height="60"
                               data-fgColor="#39CCCC">
    
                        <div class="text-white">In-Store</div>
                      </div>
                      <!-- ./col -->
                    </div>
                    <!-- /.row -->
                  </div>
                  <!-- /.card-footer -->
                </div>
                <!-- /.card -->
    
                <!-- Calendar -->
                <div class="card bg-gradient-success">
                  <div class="card-header border-0">
    
                    <h3 class="card-title">
                      <i class="far fa-calendar-alt"></i>
                      Calendar
                    </h3>
                    <!-- tools card -->
                    <div class="card-tools">
                      <!-- button with a dropdown -->
                      <div class="btn-group">
                        <button type="button" class="btn btn-success btn-sm dropdown-toggle" data-toggle="dropdown" data-offset="-52">
                          <i class="fas fa-bars"></i></button>
                        <div class="dropdown-menu" role="menu">
                          <a href="#" class="dropdown-item">Add new event</a>
                          <a href="#" class="dropdown-item">Clear events</a>
                          <div class="dropdown-divider"></div>
                          <a href="#" class="dropdown-item">View calendar</a>
                        </div>
                      </div>
                      <button type="button" class="btn btn-success btn-sm" data-card-widget="collapse">
                        <i class="fas fa-minus"></i>
                      </button>
                      <button type="button" class="btn btn-success btn-sm" data-card-widget="remove">
                        <i class="fas fa-times"></i>
                      </button>
                    </div>
                    <!-- /. tools -->
                  </div>
                  <!-- /.card-header -->
                  <div class="card-body pt-0">
                    <!--The calendar -->
                    <div id="calendar" style="width: 100%"></div>
                  </div>
                  <!-- /.card-body -->
                </div>
                <!-- /.card -->
              </section>
              <!-- right col -->
            </div>
            <!-- /.row (main row) -->
          </div><!-- /.container-fluid -->
        </section>
        <!-- /.content -->
      </div>
      <!-- /.content-wrapper -->
      <footer class="main-footer">
        <strong>Copyright &copy; 2020 <a href="therichpost.com">Your Site</a>.</strong>
        All rights reserved.
        <div class="float-right d-none d-sm-inline-block">
          <b>Version</b> 0.0.0
        </div>
      </footer>
    
      
    </div>
    <!-- ./wrapper -->

    Now we are done friends  also and If you have any kind of query or suggestion or any requirement then feel free to comment below.

    Note: Friends, I just tell the basic setup and things, you can change the code according to your requirements. For better understanding must watch video above.

    In my next posts, I will show you Angular 17 AdminLTE 3 others working pages.

    I will appreciate that if you will tell your views for this post. Nothing matters if your views will be good or bad.

    Jassa

    Thanks

  • How to create reusable components in angular 17?

    How to create reusable components in angular 17?

    Hello friends, welcome back to my blog. Today in this blog post, I am going to show you, How to create reusable components in angular 17?

    Live Demo

    Guys inside this I have used angular input output event emitter for Sharing data between child and parent directives and components.

    Angular 17 came and if you are new then you must check below link:

    1. Angular 17 Basic Tutorials
    2. Datatable

    Friends now I proceed onwards and here is the working code snippet and please use carefully this to avoid the mistakes:

    1. Firstly friends we need fresh angular 17 setup and for this we need to run below commands but if you already have angular 17 setup then you can avoid below commands. Secondly we should also have latest node version installed on our system:

    npm install -g @angular/cli 
    
    ng new angulardatatable //Create new Angular Project 
    
    cd angulardatatable // Go inside the Angular Project Folder
    
    ng g c datalist

    2. Guys for bootstrap 5 I used the cdn’s for quick output or try this to add bootstrap into angular application click here:

    <!doctype html>
    <html lang="en">
    <head>
      <meta charset="utf-8">
      <title>Jassa</title>
      <base href="/">
      <meta name="viewport" content="width=device-width, initial-scale=1">
      <link rel="icon" type="image/x-icon" href="favicon.ico">
    
    
      <!-- Google Font -->
      <link href="https://fonts.googleapis.com/css2?family=Nunito+Sans:wght@300;400;600;700;800;900&display=swap"
      rel="stylesheet">
    
      <!-- Css Styles -->
      <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta1/dist/css/bootstrap.min.css" type="text/css">
      <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/boxicons@latest/css/boxicons.min.css" type="text/css">
    
    
    </head>
    <body>
      <app-root></app-root>
      <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta1/dist/js/bootstrap.bundle.min.js"></script>
      <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
     
    </body>
    </html>
    
    

    3. Now friends we just need to add below code into src/app/app.component.ts file to create dummy data:

    ...
    
    export class AppComponent {
    
    ...
    totalCount = 0;
    
      data1 = [{
        name : 'Sam Johnson',
        dept : 'Electrical'
      },{
        name : 'Roy Thomas',
        dept : 'Mechanical'
      },{
        name : 'Jim Lasker',
        dept : 'Medical'
      }];
    
      data2 = [{
        name : 'Johnson',
        dept : 'Physics'
      },{
        name : 'Thomas',
        dept : 'Chemistry'
      },{
        name : 'Lasker',
        dept : 'Biology'
      }];
    
      calCount(count: any){
        this.totalCount = this.totalCount + count;
      }
    
    }

    4. Now friends we need to add below code into app.component.html file to get final output on web browser:

    <div class="container">
        <div class="row">
            <div class="col-sm-12">
              <app-datalist (calCount)="calCount($event)" [data]="data1" [showCount]="true"></app-datalist>
            </div>
          </div>
          
          <div class="row">
            <div class="col-sm-12">
              <app-datalist (calCount)="calCount($event)" [data]="data2" [showCount]="true"></app-datalist>
            </div>
          </div>
          
          
          
          <div class="row float-right">
            <div class="col-sm-12 count-text">
              Total Data Count ::  <strong>
                {{totalCount}}
              </strong>
            </div>
          </div>
    </div>

    5. Guys now we need to add below inside src/app/datalist/datalist.component.ts file to make reusable component:

    import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
    import { CommonModule } from '@angular/common';
    
    @Component({
      selector: 'app-datalist',
      standalone: true,
      imports: [CommonModule],
      templateUrl: './datalist.component.html',
      styleUrl: './datalist.component.css'
    })
    export class DatalistComponent {
      @Input() data :any = [];
      @Input() showCount = false;
      @Output() calCount = new EventEmitter<Number>();
    
    
      constructor() { }
    
      ngOnInit(): void {
        this.calCount.emit(this.data.length);
      }
    }
    

    6. Guys now we need to add below inside src/app/datalist/datalist.component.html file to make reusable html:

    <div class="container p-2 margin-30">
        <div class="card">
          <div class="card-body">
            <ol class="list-group list-group-numbered">
              <li *ngFor="let item of data" class="list-group-item d-flex justify-content-between align-items-start">
                <div class="ms-2 me-auto">
                  <div class="fw-bold font-fam">{{item.dept}}</div>
                  {{item.name}}
                </div>
                <span *ngIf="showCount" class="badge bg-primary rounded-pill">14</span>
              </li>
            </ol>
          </div>
        </div>
      </div>

    Now we are done friends and please run ng serve command and if you have any kind of query then please do comment below.

    Note: Friends, I just tell the basic setup and things, you can change the code according to your requirements. For better understanding must watch video above.

    I will appreciate that if you will tell your views for this post. Nothing matters if your views will be good or bad.

    Jassa

    Thanks

  • Free Inventory Management Admin Dashboard Angular 17 Bootstrap 5

    Free Inventory Management Admin Dashboard Angular 17 Bootstrap 5

    Hello everyone, if you’re in search of a responsive and user-friendly admin dashboard template in Angular 17+, then you’ve come to the right place! Today this blog post I am going to share Free Inventory Management Admin Dashboard Angular 17 Bootstrap 5.

    Live Demo

    Key Features:

    • Built on Angular 17 + Bootstrap 5
    • CSS3 & HTML5
    • Clean & minimal design
    • Cross-browser tested & optimized
    • Full-width layouts
    • Gulp based workflow
    • Opinionated code formatter Prettier for a consistent codebase
    • Modular markup based on Cards & Utility classes
    • Interactive and functional components and pages
    • FontAwesome 5 + material icons + feather icon
    • ApexCharts
    • W3C validated HTML pages
    Mobile view
    Mobile view

    Angular 17 came and Bootstrap 5 also. If you are new then you must check below two links:

    Guys now here is the complete code snippet with GitHub link following assets(css, js, fonts and images):

    1. Firstly friends we need fresh angular 17 setup and for this we need to run below commands but if you already have angular 17 setup then you can avoid below commands. Secondly we should also have latest node version installed on our system:

    npm install -g @angular/cli 
    
    ng new angularadmin //Create new Angular Project
    
    cd angularadmin // Go inside the Angular Project Folder

    2. Guys now we need to run below commands to create components to our angular application:

    ng g c dashboard
    
    ng g c sidebar
    
    ng g c header

    3. Now guys we need to add below code into our scr/app/app.component.ts file to include components into our main parent component:

    import { Component } from '@angular/core';
    import { CommonModule } from '@angular/common';
    import { RouterOutlet, RouterLink } from '@angular/router';
    import { HeaderComponent } from "./header/header.component";
    import { SidebarComponent } from "./sidebar/sidebar.component";
    
    @Component({
        selector: 'app-root',
        standalone: true,
        templateUrl: './app.component.html',
        styleUrl: './app.component.css',
        imports: [CommonModule, RouterOutlet, RouterLink, HeaderComponent, SidebarComponent]
    })
    export class AppComponent {
      title = 'angularadmin';
    }

    4. Now guys we need to add below code into our scr/app/app.component.html file for main output:

    <div id="global-loader">
        <div class="whirly-loader"> </div>
    </div>
    <app-header></app-header>
    <app-sidebar></app-sidebar>
    <div class="main-wrapper">
        <router-outlet></router-outlet>
    </div>

    5. Now guys we need to add below code into our scr/app/header/header.component.ts file making routing working:

    import { Component } from '@angular/core';
    import { RouterLink, RouterOutlet } from '@angular/router';
    @Component({
      selector: 'app-header',
      standalone: true,
      imports: [RouterOutlet, RouterLink],
      templateUrl: './header.component.html',
      styleUrl: './header.component.css'
    })
    export class HeaderComponent {
    
    }

    6. Now guys we need to add below code into our scr/app/header/header.component.html file for header:

    <div class="header">
      
        <div class="header-left active">
        <a routerLink="/" class="logo">
        <img src="assets/img/logo.png" alt="">
        </a>
        <a routerLink="/" class="logo-small">
        <img src="assets/img/logo-small.png" alt="">
        </a>
        <a id="toggle_btn" href="javascript:void(0);">
        </a>
        </div>
        
        <a id="mobile_btn" class="mobile_btn" href="#sidebar">
        <span class="bar-icon">
        <span></span>
        <span></span>
        <span></span>
        </span>
        </a>
        
        <ul class="nav user-menu">
        
        <li class="nav-item">
        <div class="top-nav-search">
        <a href="javascript:void(0);" class="responsive-search">
        <i class="fa fa-search"></i>
        </a>
        <form action="#">
        <div class="searchinputs">
        <input type="text" placeholder="Search Here ...">
        <div class="search-addon">
        <span><img src="assets/img/icons/closes.svg" alt="img"></span>
        </div>
        </div>
        <a class="btn" id="searchdiv"><img src="assets/img/icons/search.svg" alt="img"></a>
        </form>
        </div>
        </li>
        
        
        <li class="nav-item dropdown has-arrow flag-nav">
        <a class="nav-link dropdown-toggle" data-bs-toggle="dropdown" href="javascript:void(0);" role="button">
        <img src="assets/img/flags/us1.png" alt="" height="20">
        </a>
        <div class="dropdown-menu dropdown-menu-right">
        <a href="javascript:void(0);" class="dropdown-item">
        <img src="assets/img/flags/us.png" alt="" height="16"> English
        </a>
        <a href="javascript:void(0);" class="dropdown-item">
        <img src="assets/img/flags/fr.png" alt="" height="16"> French
        </a>
        <a href="javascript:void(0);" class="dropdown-item">
        <img src="assets/img/flags/es.png" alt="" height="16"> Spanish
        </a>
        <a href="javascript:void(0);" class="dropdown-item">
        <img src="assets/img/flags/de.png" alt="" height="16"> German
        </a>
        </div>
        </li>
        
        
        <li class="nav-item dropdown">
        <a href="javascript:void(0);" class="dropdown-toggle nav-link" data-bs-toggle="dropdown">
        <img src="assets/img/icons/notification-bing.svg" alt="img"> <span class="badge rounded-pill">4</span>
        </a>
        <div class="dropdown-menu notifications">
        <div class="topnav-dropdown-header">
        <span class="notification-title">Notifications</span>
        <a href="javascript:void(0)" class="clear-noti"> Clear All </a>
        </div>
        <div class="noti-content">
        <ul class="notification-list">
        <li class="notification-message">
        <a href="#">
        <div class="media d-flex">
        <span class="avatar flex-shrink-0">
        <img alt="" src="assets/img/profiles/avatar-02.jpg">
        </span>
        <div class="media-body flex-grow-1">
        <p class="noti-details"><span class="noti-title">John Doe</span> added new task <span class="noti-title">Patient appointment booking</span></p>
        <p class="noti-time"><span class="notification-time">4 mins ago</span></p>
        </div>
        </div>
        </a>
        </li>
        <li class="notification-message">
        <a href="#">
        <div class="media d-flex">
        <span class="avatar flex-shrink-0">
        <img alt="" src="assets/img/profiles/avatar-03.jpg">
        </span>
        <div class="media-body flex-grow-1">
        <p class="noti-details"><span class="noti-title">Tarah Shropshire</span> changed the task name <span class="noti-title">Appointment booking with payment gateway</span></p>
        <p class="noti-time"><span class="notification-time">6 mins ago</span></p>
        </div>
        </div>
        </a>
        </li>
        <li class="notification-message">
        <a href="#">
        <div class="media d-flex">
        <span class="avatar flex-shrink-0">
        <img alt="" src="assets/img/profiles/avatar-06.jpg">
        </span>
        <div class="media-body flex-grow-1">
        <p class="noti-details"><span class="noti-title">Misty Tison</span> added <span class="noti-title">Domenic Houston</span> and <span class="noti-title">Claire Mapes</span> to project <span class="noti-title">Doctor available module</span></p>
        <p class="noti-time"><span class="notification-time">8 mins ago</span></p>
        </div>
        </div>
        </a>
        </li>
        <li class="notification-message">
        <a href="#">
        <div class="media d-flex">
        <span class="avatar flex-shrink-0">
        <img alt="" src="assets/img/profiles/avatar-17.jpg">
        </span>
        <div class="media-body flex-grow-1">
        <p class="noti-details"><span class="noti-title">Rolland Webber</span> completed task <span class="noti-title">Patient and Doctor video conferencing</span></p>
        <p class="noti-time"><span class="notification-time">12 mins ago</span></p>
        </div>
        </div>
        </a>
        </li>
        <li class="notification-message">
        <a href="#">
        <div class="media d-flex">
        <span class="avatar flex-shrink-0">
        <img alt="" src="assets/img/profiles/avatar-13.jpg">
        </span>
        <div class="media-body flex-grow-1">
        <p class="noti-details"><span class="noti-title">Bernardo Galaviz</span> added new task <span class="noti-title">Private chat module</span></p>
        <p class="noti-time"><span class="notification-time">2 days ago</span></p>
        </div>
        </div>
        </a>
        </li>
        </ul>
        </div>
        <div class="topnav-dropdown-footer">
        <a href="#">View all Notifications</a>
        </div>
        </div>
        </li>
        
        <li class="nav-item dropdown has-arrow main-drop">
        <a href="javascript:void(0);" class="dropdown-toggle nav-link userset" data-bs-toggle="dropdown">
        <span class="user-img"><img src="assets/img/profiles/avator1.jpg" alt="">
        <span class="status online"></span></span>
        </a>
        <div class="dropdown-menu menu-drop-user">
        <div class="profilename">
        <div class="profileset">
        <span class="user-img"><img src="assets/img/profiles/avator1.jpg" alt="">
        <span class="status online"></span></span>
        <div class="profilesets">
        <h6>John Doe</h6>
        <h5>Admin</h5>
        </div>
        </div>
        <hr class="m-0">
        <a class="dropdown-item" href="#"> <i class="me-2" data-feather="user"></i> My Profile</a>
        <a class="dropdown-item" href="#"><i class="me-2" data-feather="settings"></i>Settings</a>
        <hr class="m-0">
        <a class="dropdown-item logout pb-0" href="#"><img src="assets/img/icons/log-out.svg" class="me-2" alt="img">Logout</a>
        </div>
        </div>
        </li>
        </ul>
        
        
        <div class="dropdown mobile-user-menu">
        <a href="javascript:void(0);" class="nav-link dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false"><i class="fa fa-ellipsis-v"></i></a>
        <div class="dropdown-menu dropdown-menu-right">
        <a class="dropdown-item" href="#">My Profile</a>
        <a class="dropdown-item" href="#">Settings</a>
        <a class="dropdown-item" href="#">Logout</a>
        </div>
        </div>
        
        </div>

    7. Now guys we need to add below code into our scr/app/dashboard/dashboard.component.html file for main page html:

    <div class="page-wrapper">
    <div class="content">
    <div class="row">
    <div class="col-lg-3 col-sm-6 col-12">
    <div class="dash-widget">
    <div class="dash-widgetimg">
    <span><img src="assets/img/icons/dash1.svg" alt="img"></span>
    </div>
    <div class="dash-widgetcontent">
    <h5><span class="counters" data-count="307144.00">$307,144.00</span></h5> <h6>Total Purchase Due</h6> </div> </div> </div> <div class="col-lg-3 col-sm-6 col-12"> <div class="dash-widget dash1"> <div class="dash-widgetimg"> <span><img src="assets/img/icons/dash2.svg" alt="img"></span> </div> <div class="dash-widgetcontent"> <h5><span class="counters" data-count="4385.00">$4,385.00</span></h5> <h6>Total Sales Due</h6> </div> </div> </div> <div class="col-lg-3 col-sm-6 col-12"> <div class="dash-widget dash2"> <div class="dash-widgetimg"> <span><img src="assets/img/icons/dash3.svg" alt="img"></span> </div> <div class="dash-widgetcontent"> <h5><span class="counters" data-count="385656.50">385,656.50</span></h5> <h6>Total Sale Amount</h6> </div> </div> </div> <div class="col-lg-3 col-sm-6 col-12"> <div class="dash-widget dash3"> <div class="dash-widgetimg"> <span><img src="assets/img/icons/dash4.svg" alt="img"></span> </div> <div class="dash-widgetcontent"> <h5><span class="counters" data-count="40000.00">400.00</span></h5> <h6>Total Sale Amount</h6> </div> </div> </div> <div class="col-lg-3 col-sm-6 col-12 d-flex"> <div class="dash-count"> <div class="dash-counts"> <h4>100</h4> <h5>Customers</h5> </div> <div class="dash-imgs"> <i data-feather="user"></i> </div> </div> </div> <div class="col-lg-3 col-sm-6 col-12 d-flex"> <div class="dash-count das1"> <div class="dash-counts"> <h4>100</h4> <h5>Suppliers</h5> </div> <div class="dash-imgs"> <i data-feather="user-check"></i> </div> </div> </div> <div class="col-lg-3 col-sm-6 col-12 d-flex"> <div class="dash-count das2"> <div class="dash-counts"> <h4>100</h4> <h5>Purchase Invoice</h5> </div> <div class="dash-imgs"> <i data-feather="file-text"></i> </div> </div> </div> <div class="col-lg-3 col-sm-6 col-12 d-flex"> <div class="dash-count das3"> <div class="dash-counts"> <h4>105</h4> <h5>Sales Invoice</h5> </div> <div class="dash-imgs"> <i data-feather="file"></i> </div> </div> </div> </div> <div class="row"> <div class="col-lg-7 col-sm-12 col-12 d-flex"> <div class="card flex-fill"> <div class="card-header pb-0 d-flex justify-content-between align-items-center"> <h5 class="card-title mb-0">Purchase & Sales</h5> <div class="graph-sets"> <ul> <li> <span>Sales</span> </li> <li> <span>Purchase</span> </li> </ul> <div class="dropdown"> <button class="btn btn-white btn-sm dropdown-toggle" type="button" id="dropdownMenuButton" data-bs-toggle="dropdown" aria-expanded="false"> 2024 <img src="assets/img/icons/dropdown.svg" alt="img" class="ms-2"> </button> <ul class="dropdown-menu" aria-labelledby="dropdownMenuButton"> <li> <a href="javascript:void(0);" class="dropdown-item">2024</a> </li> <li> <a href="javascript:void(0);" class="dropdown-item">2023</a> </li> <li> <a href="javascript:void(0);" class="dropdown-item">2022</a> </li> </ul> </div> </div> </div> <div class="card-body"> <div id="sales_charts"></div> </div> </div> </div> <div class="col-lg-5 col-sm-12 col-12 d-flex"> <div class="card flex-fill"> <div class="card-header pb-0 d-flex justify-content-between align-items-center"> <h4 class="card-title mb-0">Recently Added Products</h4> <div class="dropdown"> <a href="javascript:void(0);" data-bs-toggle="dropdown" aria-expanded="false" class="dropset"> <i class="fa fa-ellipsis-v"></i> </a> <ul class="dropdown-menu" aria-labelledby="dropdownMenuButton"> <li> <a href="#" class="dropdown-item">Product List</a> </li> <li> <a href="#" class="dropdown-item">Product Add</a> </li> </ul> </div> </div> <div class="card-body"> <div class="table-responsive dataview"> <table class="table datatable "> <thead> <tr> <th>Sno</th> <th>Products</th> <th>Price</th> </tr> </thead> <tbody> <tr> <td>1</td> <td class="productimgname"> <a href="#" class="product-img"> <img src="assets/img/product/product22.jpg" alt="product"> </a> <a href="#">Apple Earpods</a> </td> <td>$891.2</td> </tr> <tr> <td>2</td> <td class="productimgname"> <a href="#" class="product-img"> <img src="assets/img/product/product23.jpg" alt="product"> </a> <a href="#">iPhone 11</a> </td> <td>$668.51</td> </tr> <tr> <td>3</td> <td class="productimgname"> <a href="#" class="product-img"> <img src="assets/img/product/product24.jpg" alt="product"> </a> <a href="#">samsung</a> </td> <td>$522.29</td> </tr> <tr> <td>4</td> <td class="productimgname"> <a href="#" class="product-img"> <img src="assets/img/product/product6.jpg" alt="product"> </a> <a href="#">Macbook Pro</a> </td> <td>$291.01</td> </tr> </tbody> </table> </div> </div> </div> </div> </div> <div class="card mb-0"> <div class="card-body"> <h4 class="card-title">Expired Products</h4> <div class="table-responsive dataview"> <table class="table datatable "> <thead> <tr> <th>SNo</th> <th>Product Code</th> <th>Product Name</th> <th>Brand Name</th> <th>Category Name</th> <th>Expiry Date</th> </tr> </thead> <tbody> <tr> <td>1</td> <td><a href="javascript:void(0);">IT0001</a></td> <td class="productimgname"> <a class="product-img" href="#"> <img src="assets/img/product/product2.jpg" alt="product"> </a> <a href="#">Orange</a> </td> <td>N/D</td> <td>Fruits</td> <td>12-12-2023</td> </tr> <tr> <td>2</td> <td><a href="javascript:void(0);">IT0002</a></td> <td class="productimgname"> <a class="product-img" href="#"> <img src="assets/img/product/product3.jpg" alt="product"> </a> <a href="#">Pineapple</a> </td> <td>N/D</td> <td>Fruits</td> <td>25-11-2023</td> </tr> <tr> <td>3</td> <td><a href="javascript:void(0);">IT0003</a></td> <td class="productimgname"> <a class="product-img" href="#"> <img src="assets/img/product/product4.jpg" alt="product"> </a> <a href="#">Stawberry</a> </td> <td>N/D</td> <td>Fruits</td> <td>19-11-2023</td> </tr> <tr> <td>4</td> <td><a href="javascript:void(0);">IT0004</a></td> <td class="productimgname"> <a class="product-img" href="#"> <img src="assets/img/product/product5.jpg" alt="product"> </a> <a href="#">Avocat</a> </td> <td>N/D</td> <td>Fruits</td> <td>20-11-2023</td> </tr> </tbody> </table> </div> </div> </div> </div> </div>

    8. Now guys we need to add below code into our scr/app/dashboard/dashboard.component.ts file for routing working:

    import { Component } from '@angular/core';
    import { RouterOutlet, RouterLink } from '@angular/router';
    @Component({
      selector: 'app-dashboard',
      standalone: true,
      imports: [RouterOutlet, RouterLink],
      templateUrl: './dashboard.component.html',
      styleUrl: './dashboard.component.css'
    })
    export class DashboardComponent {
    
    }

    9. Now guys we need to add below code into our scr/app/sidebar/sidebar.component.ts file for routing working:

    import { Component } from '@angular/core';
    import { RouterOutlet, RouterLink } from '@angular/router';
    
    @Component({
      selector: 'app-samplepage',
      standalone: true,
      imports: [RouterOutlet, RouterLink],
      templateUrl: './samplepage.component.html',
      styleUrl: './samplepage.component.css'
    })
    export class SamplepageComponent {
    
    }
    

    10. Now guys we need to add below code into our scr/app/sidebar/sidebar.component.html file:

    <div class="sidebar" id="sidebar">
        <div class="sidebar-inner slimscroll">
        <div id="sidebar-menu" class="sidebar-menu">
        <ul>
        <li class="active">
        <a routerLink="/"><img src="assets/img/icons/dashboard.svg" alt="img"><span> Dashboard</span> </a>
        </li>
        </ul>
        </div>
        </div>
    </div>

    11. Now guys we need to add below into src/app/app.routes.ts to links components to routes:

    import { Routes } from '@angular/router';
    import { DashboardComponent } from './dashboard/dashboard.component';
    
    
    export const routes: Routes = [
        {
            path: '', title: 'Dashboard Page', component: DashboardComponent,
          },
          
    ];
    

    12. Now guys we need to add below code into our project/angular.json file for styles and scripts:

    ... "styles": [ "src/styles.css", "src/assets/css/bootstrap.min.css", "src/assets/css/animate.css", "src/assets/css/dataTables.bootstrap4.min.css", "src/assets/plugins/fontawesome/css/fontawesome.min.css", "src/assets/plugins/fontawesome/css/all.min.css", "src/assets/css/style.css" ], "scripts": ["src/assets/js/jquery-3.6.0.min.js", "src/assets/js/feather.min.js", "src/assets/js/jquery.slimscroll.min.js", "src/assets/js/jquery.dataTables.min.js", "src/assets/js/dataTables.bootstrap4.min.js", "src/assets/js/bootstrap.bundle.min.js", "src/assets/plugins/apexchart/apexcharts.min.js", "src/assets/plugins/apexchart/chart-data.js", "src/assets/js/script.js" ], ...

    13. Now guys here is the github link and from where we will get the all the assets like images, css, js and fonts:

    GitHub Link

    14. Now guys we need to below code inside src/index.html file to get the favicon:

    <!doctype html>
    <html lang="en">
    <head>
     ...
      
    
       <link rel="shortcut icon" type="image/x-icon" href="assets/img/favicon.jpg">
    
       
    </head>
    <body>
      <app-root></app-root>
    
    </body>
    </html>
    

    Friends in the end must run ng serve command into your terminal to run the angular 17 project(localhost:4200).

    Now we are done friends. If you have any kind of query, suggestion and new requirement then feel free to comment below.

    Note: Friends, In this post, I just tell the basic setup and things, you can change the code according to your requirements.

    I will appreciate that if you will tell your views for this post. Nothing matters if your views will be good or bad because with your views, I will make my next posts more good and helpful.

    Jassa

    Thanks