Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

sort used in price high and low using angular

<main role="main" data-aos="fade-right" data-aos-duration="1000">
<div class="jumbotron section">
  <div class="container">
    <div class="d-flex flex-row">
      <div class="col-2">
        <div><strong>Shop by Product</strong></div>
        <ul class="nav flex-column">
          <li class="nav-item">
            <a class="nav-link active" routerLink="/shop">View All</a>
          </li>
          <li class="nav-item">
            <a class="nav-link" routerLink="/shop/recently-added">New Arrival</a>
          </li>
          <li class="nav-item">
            <a class="nav-link" routerLink="/shop/category/Necklaces">Necklaces</a>
          </li>
          <li class="nav-item">
            <a class="nav-link" routerLink="/shop/category/Bracelets-Anklets">Bracelets and Anklets</a>
          </li>
          <li class="nav-item">
            <a class="nav-link" routerLink="/shop/category/Earrings">Earrings</a>
          </li>
          <li class="nav-item">
            <a class="nav-link" routerLink="/shop/category/Rings">Rings</a>
          </li>
          <li class="nav-item">
            <a class="nav-link" routerLink="/shop/best-sellers">Bestsellers</a>
          </li>
          <li class="nav-item">
            <a class="nav-link" routerLink="/shop/category/Other">Others</a>
          </li>
        </ul>
      </div>
      <div class="col-10">
        <div class="d-flex justify-content-start flex-wrap" *ngIf="products$">
          <div class="card mx-2" *ngFor="let product of products$; let i = index" [routerLink]="['/product/', product._id]">
            <div class="img-hover-zoom"> <img src="{{product.imageUrl}}" class="img-fluid card-img-top" /></div>
            <div class="card-body">
              <div class="card-text">
                <a>
                  <span style="font-weight: bold;">{{ product.name }}</span>
                </a>
              </div>
              <div class="card-title">Php {{ product.price }}</div>
              <p *ngIf="product.stock_quantity == 0" style="color: red;font-size: 12pt;">Out of stock</p>
            </div>
          </div>
        </div>
      </div>
      <div class="col">
        <select>
          <option selected value="undefined" disabled>
            Choose Category
          </option>
          <option value="l2h">Price: Low to High</option>
          <option value="h2l">Price: High to Low</option>
        </select>
      </div>
    </div>
  </div>
</div>
<a routerLink="/shop" id="back-to-top" class="back-to-top" style="display: inline;">
  <i class="fa fa-arrow-up pt-3 pl-2 ml-2"></i>
</a>
Comment

PREVIOUS NEXT
Code Example
Javascript :: pass a callback funcion into an async function node js 
Javascript :: if this then this, else that 
Javascript :: copy one cell value to another in google app script 
Javascript :: Reversing the elements in an array-like object 
Javascript :: how to set maxLength of input type number in react 
Javascript :: uncheck all other checkboxes when one is checked 
Javascript :: react-folder tree example 
Javascript :: javascript reduce form object 
Javascript :: create index with multiple fields mongo 
Javascript :: How can I force a refresh in my spa website with vuejs - laravel 
Javascript :: Javascript - Dependency between arguments of partial applications 
Javascript :: javascript llop array 
Javascript :: Randomly getting error 500 in Azure App Service when downloading angularjs template 
Javascript :: How to add ui-scroll with remote data in angularjs 
Javascript :: How to call keyup function on textbox for every dynamic generated form in Angular8 
Javascript :: Understanding higher order JavaScript functions 
Javascript :: React Native Root Element, deciding on async call 
Javascript :: adding text to ant media stream 
Javascript :: js generate pnh 
Javascript :: Any array in JSON object is not empty 
Javascript :: jquery call service 
Javascript :: show code in console very good 
Javascript :: word array to string cryptojs 
Javascript :: phaser move towards object 
Javascript :: yoptascript 
Javascript :: reduxjs toolkit createaction 
Javascript :: how do i block or restrict special characters from input fields with jquery 
Javascript :: prisma Return a relations count with include 
Javascript :: Looping through array, fetching tweets and returning new reversed array javascript react 
Javascript :: stringToCapital.js 
ADD CONTENT
Topic
Content
Source link
Name
7+9 =