flex-layout: Custom breakpoints - Cannot read property 'mediaQuery' of undefined error

I’m trying to create my own custom breakpoints. Using the doc as a reference, I get a Cannot read property 'mediaQuery' of undefined error.

I’m overriding the default breakpoints in the custom-breakpoints.component.ts file and using it in the custom-breakpoints.module.ts which is then being imported into the app via the test-app.module.ts file.

Here is a plunker that shows what I’m trying to do.

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 1
  • Comments: 19 (9 by maintainers)

Most upvoted comments

Update: Every time I overwrote the BREAKPOINTS provider successfully, none of the Directives seem to work and the breakpoints are not triggered at all. Not sure why… I think we have to wait until this feature is retested and documents updated.

@alexeagle - you continue to pop up first in my list!

Found my problem. Look at my code above: I have forgotten to include “px” in the media detection!