I am trying to pass a variable from the model ts into a specific nth-child element, but I am struggling with how to accomplish this. My current code snippet looks like this:
ts model:
@Input() public limit: number
scss:
.collapsed-list {
max-height:15rem;
overflow: hidden;
.expandable:nth-child(${limit}) {
color: red;
}
}
Any suggestions on how to achieve this would be greatly appreciated. Thank you!