Skip to content

Angular SSR matchMedia is not definet #25

@jemys89

Description

@jemys89

Hi,

I am using universal angular.
I can't fix the implementation of multiple screens.

my configuration in app.module:

const ciConfig = {
  token: '****',
  baseUrl: '**********',
  presets: {
    xs: '(max-width: 575px)', // up to 575    PHONE
    sm: '(min-width: 576px)', // 576 - 767    PHABLET
    md: '(min-width: 768px)', // 768 - 991    TABLET
    lg: '(min-width: 992px)', // 992 - 1199   SMALL_LAPTOP_SCREEN
    xl: '(min-width: 1200px)' // from 1200    USUALSCREEN
  }
};

<ci-img [src]="image.src" operation="crop" size='xs 500x600, md 1000x1350, lg 1400x1200, xl 1600x1000'></ci-img>

ERROR ReferenceError: matchMedia is not defined
    at /*/dist/web/server/main.js:171717:39
    at Array.find (<anonymous>)
    at CIService.getBreakPoint 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions