set-a-password.component.ts 942 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
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;
  }
}