All files / app/elements/marketing-trip-menu marketing-trip-menu.component.ts

92% Statements 23/25
100% Branches 2/2
100% Functions 2/2
92% Lines 23/25

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 261x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x   1x 1x   1x 1x 1x  
import { Component, OnInit, inject } from '@angular/core';
import { SharedDataService } from '@services/menu.service';
 
@Component({
    selector: 'grt-marketing-trip-menu',
    imports: [],
    templateUrl: './marketing-trip-menu.component.html',
    styleUrl: './marketing-trip-menu.component.scss'
})
export class MarketingTripMenuComponent implements OnInit {
	private menuService = inject(SharedDataService);
 
	menus: any;
 
	ngOnInit(): void {
		this.menuService
			.getTripPageMenu()
			.then((data: any) => {
				this.menus = data.tour_destinations_data[0].menus;
			})
			.catch((error: any) => {
				console.error(error);
			});
	}
}