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

24 lines
519 B
TypeScript

import { Component, OnInit, OnChanges } from '@angular/core';
import { CartService } from 'src/app/services/cart.service';
2 years ago
@Component({
selector: 'app-navbar',
templateUrl: './navbar.component.html',
styleUrls: ['./navbar.component.scss']
})
export class NavbarComponent implements OnInit {
cartQuantity: number = 0
2 years ago
constructor(private cartService: CartService) { }
2 years ago
ngOnInit(): void {
}
onChanges(): void {
this.cartQuantity = this.cartService.getQuantity()
console.log('halou')
2 years ago
}
}