You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

31 lines
787 B

import { Component, OnInit } from '@angular/core';
import { Orderdto } from 'src/app/model/Orderdto';
import { CartService } from 'src/app/service/cart.service';
declare const calc:any
@Component({
selector: 'app-order',
templateUrl: './order.component.html',
styleUrls: ['./order.component.css']
})
export class OrderComponent implements OnInit {
public products : any = [];
orderdto!:Orderdto[];
public grandTotal : any;
uid!:any;
constructor(private cartService:CartService) { }
ngOnInit(): void {
this.uid = window.sessionStorage.getItem('userid');
this.cartService.getOrder(this.uid).subscribe(res=>{
this.orderdto = res;
})
this.cartService.getordersumByUid(this.uid).subscribe(data=>{
this.grandTotal=data;
})
}
}