I am trying to detect the screen resolution of the browser in Angular Universal but I'dont get it, on the side of the browser, I use BreakpointObserver of Angular Material, but on the server is not working:
this.breakpointObserver.observe(['(max-width: 575px)']).pipe(filter(result => result.matches == true)).subscribe((result: any) =>
{
console.log('(max-width: 575px)', result)
this.imageBackground = this.imageBackgroundPortrait;
});
This It is ignored on the server. Any suggestions? Thanks.