You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 6, 2025. It is now read-only.
feat(server): add ability to specify breakpoints for MediaObserver (#999)
On the server, there is no conception of "browser window," because Angular's
browser implementation doesn't implement it. This means MatchMedia breakpoint activations will not work on the server.
Layout SSR will generate CSS Stylesheets for all known breakpoints. And for the static, delivered-first HTML pages the directives are replaced with their associated, generated CSS classnames.
But for programmatic usages of `MediaObserver`, we don't have a fallback mechanism to *announce* breakpoint activations. This PR allows a user to specify which activations they want to trigger via the MediaObserver for programmatic view listeners.
This can be done using the following configuration:
```ts
FlexLayoutModule.withConfig({serverBreakpoints: ['xs', 'lt-md']})
```
Fixes#991 .
0 commit comments