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.
22 lines
478 B
TypeScript
22 lines
478 B
TypeScript
import { Component, OnInit } from '@angular/core';
|
|
import { CartService } from 'src/app/services/cart.service';
|
|
|
|
@Component({
|
|
selector: 'app-navbar',
|
|
templateUrl: './navbar.component.html',
|
|
styleUrls: ['./navbar.component.scss']
|
|
})
|
|
export class NavbarComponent implements OnInit {
|
|
cartQuantity: number = 0
|
|
|
|
constructor(private cartService: CartService) { }
|
|
|
|
ngOnInit(): void {
|
|
}
|
|
|
|
ngDoCheck(): void {
|
|
this.cartQuantity = this.cartService.getQuantity()
|
|
}
|
|
|
|
}
|