How to get a screen resize dimension from a service in angular 2+?
问题 First this not duplicated take time to read, because there is lot of similar question but they are in the @Component decorator I got the idea to catch screen resizing in a service then sharing some css value by an observable, but it seem that my service is not working (not able to catch screen resize event). Here is my code import { Injectable, HostListener } from '@angular/core'; import { BehaviorSubject } from 'rxjs'; @Injectable({ providedIn: 'root', }) export class BreakPointService {