Skip to content

Commit

Permalink
cleaning code
Browse files Browse the repository at this point in the history
  • Loading branch information
wnawa committed Jan 19, 2024
1 parent 3085006 commit 9ea771a
Show file tree
Hide file tree
Showing 24 changed files with 1,601 additions and 1,244 deletions.
13 changes: 2 additions & 11 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,34 +21,25 @@
],
"tsConfig": "tsconfig.app.json",
"assets": [
"src/favicon.ico",
"src/assets"
],
"styles": [
"node_modules/bootstrap/dist/css/bootstrap.min.css",
"node_modules/slick-carousel/slick/slick.scss",
"node_modules/slick-carousel/slick/slick-theme.scss",
"node_modules/ngx-owl-carousel-o/lib/styles/prebuilt-themes/owl.carousel.min.css",
"node_modules/ngx-owl-carousel-o/lib/styles/prebuilt-themes/owl.theme.default.min.css",

"node_modules/font-awesome/css/font-awesome.css",

"node_modules/bxslider/dist/jquery.bxslider.min.css",
"src/assets/css/responsive.css",
"src/assets/css/owl.carousel.css",
"node_modules/animate.css/animate.min.css",
"src/styles.css"
],
"scripts": [
"scripts": [
"node_modules/jquery/dist/jquery.min.js",
"node_modules/bootstrap/dist/js/bootstrap.min.js",

"node_modules/slick-carousel/slick/slick.min.js",
"node_modules/jquery.easing/jquery.easing.min.js",
"node_modules/owl.carousel/dist/owl.carousel.min.js",
"node_modules/jquery-sticky/jquery.sticky.js",

"node_modules/bxslider/dist/jquery.bxslider.min.js",

"src/assets/js/script.slider.js",
"src/assets/js/jquery.sticky.js",
"src/assets/js/main.js"
Expand Down
5 changes: 0 additions & 5 deletions src/app/app.component.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import { Component } from '@angular/core';
import { CommonModule } from '@angular/common';
import { RouterModule, RouterOutlet, Routes } from '@angular/router';


import { FooterComponent } from './footer/footer.component';
import { HeaderComponent } from './header/header.component';
import { HomeComponent } from './home/home.component';
Expand All @@ -11,12 +9,9 @@ import { CartPageComponent } from './cart-page/cart-page.component';
import { ProductdetailsComponent } from './productdetails/productdetails.component';
import { CheckoutComponent } from './checkout/checkout.component';
import { LatestProductsComponent } from './latest-products/latest-products.component';
// import { NgModule } from '@angular/core';
// import { BrowserModule } from '@angular/platform-browser';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { CarouselModule } from 'ngx-owl-carousel-o';

// import { AngularFontAwesomeModule } from 'angular-font-awesome';
@Component({
selector: 'app-root',
standalone: true,
Expand Down
25 changes: 14 additions & 11 deletions src/app/cart-page/cart-page.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,9 @@ <h2 class="sidebar-title">Recent Posts</h2>
</td>

<td class="product-price">
<span class="amount">{{ cartItem.product.Price |currency }}</span>
<span class="amount">{{
cartItem.product.Price | currency
}}</span>
</td>

<td class="product-quantity">
Expand All @@ -152,11 +154,8 @@ <h2 class="sidebar-title">Recent Posts</h2>
value="{{ cartItem.quantity }}"
min="1"
step="1"
#qnty
(change)="updateQuantitiy(cartItem.id,qnty.value)"



#qnty
(change)="updateQuantitiy(cartItem.id, qnty.value)"
/>
<input
type="button"
Expand All @@ -172,7 +171,9 @@ <h2 class="sidebar-title">Recent Posts</h2>
</td>

<td class="product-subtotal">
<span class="amount">{{ cartItem.price|currency }}</span>
<span class="amount">{{
cartItem.price | currency
}}</span>
</td>
</tr>
}
Expand Down Expand Up @@ -285,7 +286,9 @@ <h2>Cart Totals</h2>
<tr class="cart-subtotal">
<th>Cart Subtotal</th>
<td>
<span class="amount">{{ cart.totalPrice|currency }}</span>
<span class="amount">{{
cart.totalPrice | currency
}}</span>
</td>
</tr>

Expand All @@ -298,9 +301,9 @@ <h2>Cart Totals</h2>
<th>Order Total</th>
<td>
<strong
><span class="amount"
>{{ cart.totalPrice |currency}}</span
></strong
><span class="amount">{{
cart.totalPrice | currency
}}</span></strong
>
</td>
</tr>
Expand Down
2 changes: 1 addition & 1 deletion src/app/cart-page/cart-page.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { CommonModule } from '@angular/common';
})
export class CartPageComponent {
cart!: Cart;
// quantity: number = 1;

constructor(private cartservice: CartService) {
this.setCart();
}
Expand Down
Loading

0 comments on commit 9ea771a

Please sign in to comment.