import { Component, EventEmitter, Input, Output } from '@angular/core'; @Component({ selector: 'app-set-a-password', templateUrl: './set-a-password.component.html', styleUrls: ['./set-a-password.component.scss'] }) export class SetAPasswordComponent { @Input() pathTitle = ['การจัดการข้อมูลองค์กร', 'ตั้งค่าผู้ใช้งาน', 'สร้างรหัสผู้ใช้งาน'] @Output() sendPathTitle: EventEmitter<string[]> = new EventEmitter<string[]>(); activeTab: string = 'tab1'; // กำหนด tab เริ่มต้น // ฟังก์ชันในการเปลี่ยนแท็บ changeTab(tab: { id: string, text: string }) { this.sendPathTitle.emit(['การจัดการข้อมูลองค์กร', 'ตั้งค่าผู้ใช้งาน', tab.text]) this.activeTab = tab.id; } }