Skip to content
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

mat-sidenav broken in Angular Universal between 6.0.0-rc.14 and 6.0.0 #11207

Open
speige opened this issue May 7, 2018 · 4 comments
Open

mat-sidenav broken in Angular Universal between 6.0.0-rc.14 and 6.0.0 #11207

speige opened this issue May 7, 2018 · 4 comments
Labels
area: material/sidenav P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent

Comments

@speige
Copy link

speige commented May 7, 2018

Bug, feature request, or proposal:

mat-sidenav throws error in angular universal

What is the expected behavior?

No error thrown

What is the current behavior?

NodeInvocationException: The animation trigger "transform" has failed to build due to the following errors:

  • The provided animation property "box-shadow" is not a supported CSS property for animations
    Error: The animation trigger "transform" has failed to build due to the following errors:
  • The provided animation property "box-shadow" is not a supported CSS property for animations

What are the steps to reproduce?

Create a new starter project in angular 6 and universal server-side rendering with a mat-sidenav. Swap package.json between "@angular/material" 6.0.0-rc.14 and 6.0.0. Notice it works with rc14 but throws an error with 6.0.0 (& 6.0.1)

Which versions of Angular, Material, OS, TypeScript, browsers are affected?

"typescript": "2.7.2"

@jelbourn jelbourn added the P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent label May 7, 2018
@yumagulov-azat
Copy link

Same problem.

@rickysandoval
Copy link

rickysandoval commented Jun 12, 2018

Workaround if you are using angular universal starter:

Object.defineProperty(win.document.body.style, 'box-shadow', {
    value: () => {
        return {
            enumerable: true,
            configurable: true
        };
    },
});

With win being the created window object from domino.

This would go at line 23 of this server.ts file: https://github.com/Angular-RU/angular-universal-starter/blob/master/server.ts

@speige
Copy link
Author

speige commented Jun 12, 2018

@rickysandoval thanks, that fixed my issue.

@yumagulov-azat
Copy link

@rickysandoval thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: material/sidenav P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
6 participants