Allow injecting default MediaQuery value in SSR
See original GitHub issueFeature Request
What is the desired behavior?
It should be possible to provide a custom default value for the MediaQuery on the servers side for FlexLayoutServerModule to use. Right now it always uses ‘sm’. At least it supposed to use it but actually in 7.0.0-beta.23 it instead uses ‘all’ and simultaneously applies all impossible rules…
What is the use-case or motivation for the desired behavior?
Last MediaQuery value from the client side can be stored in cookies and used next time on the server side. In most cases user would have the same window size as from the last visit. Especially if it was a mobile device. So we can safely use it on the server side to generate a proper view. flex-layout
library should not take care of last MediaQuery value storage. Only the way to override its default one is necessary.
Is there anything else we should know?
As I’ve mentioned above - in 7.0.0-beta.23 MediaQuery defaults to ‘all’ instead of ‘sm’ on the server side.
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (3 by maintainers)
Top GitHub Comments
Yes, you can do that instead of using the static method. The static method just aliases to providing that token value
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.