3
Is it possible through the 2+ angle to get the size and width of the browser and from there send this data to the css in order to make it responsive? Is there any other way to leave responsive without media queries?
I know there is the following developer who can get the size and width of the browser, but there is some way through these values to make the design responsive?
Grateful
@HostListener('window:resize', ['$event'])
See that a "responsive design" is achieved with
css
, and not with the frameworkjavascript
that you’re using, be itangular
,react
or any other, having to write code to do what the browser already does for you usingcss
. Just punctuated that if you still want to do usingjavascript
, language itself can obtain this information, the objectwindow.screen
return width and height. Also, you can have the size of the area effectively "usable" withwindow.innerWidth
andwindow.innerHeight
.– Ricardo Pontual