File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed
Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change 88 HostBinding
99} from "@angular/core" ;
1010
11- let nextId = 0 ;
12-
1311/**
1412* The `Tab` component is a child of the `Tabs` component.
1513* It represents one `Tab` item and its content within a panel of other `Tab` items.
@@ -70,6 +68,7 @@ let nextId = 0;
7068 `
7169} )
7270export class Tab implements OnInit {
71+ private static counter = 0 ;
7372 /**
7473 * Boolean value reflects if the `Tab` is using a custom template for the heading.
7574 * Default value is false.
@@ -102,11 +101,10 @@ export class Tab implements OnInit {
102101 @Input ( ) disabled = false ;
103102
104103 @Input ( ) tabIndex = 0 ;
105- // do we need id's?
106104 /**
107105 * Sets the id of the `Tab`. Will be uniquely generated if not provided.
108106 */
109- @Input ( ) id = `n-tab-${ nextId ++ } ` ;
107+ @Input ( ) id = `n-tab-${ Tab . counter ++ } ` ;
110108 /**
111109 * Set to true to have Tab items cached and not reloaded on tab switching.
112110 */
You can’t perform that action at this time.
0 commit comments