I have a plunker here - https://stackblitz.com/edit/ng-first-v-last-wide-labels?file=src%2Fapp%2Fbar-chart.ts
I have a d3 chart in an Angular app.
I'm trying to capture the screen size and do something different when hovering over the bars below a screen size.
I'm trying to do this using
if (window.screen.width > 500) {
alert('small')
}
This alerts all the time and not only when below 500
How can I capture screen size so I can use it in the code
window.screen.width < 500?window.innerWidth < 600