Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

539 B
Raw Blame
import { Injectable } from '@angular/core';

@Injectable({ providedIn: 'root' })
export class DeviceService {
  public mobileWidthThreshold = 544;
  public tabletWidthThreshold = 768;
  public smallDesktopWidthThreshold = 1012;

  public get isMobile():boolean {
    return (window.innerWidth < this.mobileWidthThreshold);
  }

  public get isTablet():boolean {
    return (window.innerWidth < this.tabletWidthThreshold);
  }

  public get isSmallDesktop():boolean {
    return (window.innerWidth < this.smallDesktopWidthThreshold);
  }
}