-
Notifications
You must be signed in to change notification settings - Fork 772
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using flex-layout with Angular Universal #187
Comments
Currently we do NOT support flex-layout with Angular Universal. |
@alxhub - any thoughts how we should change our use of: |
@BirdInTheCity I had the same problem so I decided to use Layouts from MDL https://getmdl.io/. |
@BirdInTheCity - can you provide a simple project (zip) that demonstrates this ? We will investigate. Currently I am unclear how Angular Universal handles issues with code references to
|
Is this going to make it into the |
@nicky-lenaers - no. There are unknowns that still need to be resolved? (see above questions). |
When working with this you should focus on angular4 support instead of angular/universal given that 4 has universal built into @angular/platform-browser and @angular/platform-server. @ThomasBurleson when working with document for universal you want to manipulate the renderer instead of document for rendering updates like your doing on https://github.com/angular/flex-layout/blob/master/src/lib/flexbox/api/base.ts#L138. If you have direct need for getDOM() you'll want to check for getDom() first and if it exists then isBrowser is true else your in node and probably won't be able to directly make that call. Side note; a quick search through the current master is showing that you don't have any glaring issues with universal support so it should be pretty close to ready as is. |
@paullryan nice, I really hope it'll be available soon! |
Both |
I see errors on the |
@nicky-lenaers - The current issue is that On the client-side, rendering needs to force a re-register of the media queries to trigger the appropriate match announcements. |
@ThomasBurleson great to here there is a solution. Is this already in development? |
With the yesterday's 2.0.0-beta-4 release of |
Once PR #342 has been merged we will submit a revised PR for Angular Universal support. |
@ThomasBurleson Merged! |
@glebmachine - We appreciate your passion, thank you. We are working on this issue now! ;-) |
FYI - The team is hoping to close this issue within the next 2-3 workdays. |
Awesome!
|
I'm using beta.9 and I have the error |
Guys, i'm struggling about: Does anybody have monkey patch about that? |
Done, i'm patch it with:
That is filthy, but it works) |
@glebmachine Flex Layout fully supports Angular Universal as of v5.0.0-beta.13. Please ensure you have the correct version installed and follow the SSR guide here. |
Thank you! I following this guide, but suddenly got error into ShowHideDirective : ( |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
From my limited knowledge of Node, I gather that anything referencing
Document
orWindow
will throw a server-side error.That said, I'd like to incorporate flex-layout into my Angular Universal app. Is that possible? My initial attempt (simply following the readme) throws the following error:
The text was updated successfully, but these errors were encountered: