Use case for tabs component #3510
Answered
by
fabiobiondi
Leonardonline
asked this question in
PrimeNG
-
Hi, how can I handle events on tab change? |
Beta Was this translation helpful? Give feedback.
Answered by
fabiobiondi
Feb 6, 2025
Replies: 1 comment 1 reply
-
Hi @Leonardonline ,
<p-tabs [(value)]="tabIndex">
tabIndex = model(2) // <== you can also set the default tab to open, i.e. 2
constructor() {
effect(() => {
console.log(this.tabIndex())
});
}
this.tabIndex.set(1) |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
Leonardonline
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi @Leonardonline ,
you may use another approach: