-
Notifications
You must be signed in to change notification settings - Fork 6.8k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Cannot read property 'bind' of undefined at new MediaMatcher #8710
Comments
I have the same issue.In my case it is because I inject in app.component MatSnackBar , but I haven`t found solution yet. |
MatSnackBar working: Angular-RU/universal-starter@b848c41 var fs = require('fs')
const someFile = './server.js';
fs.readFile(someFile, 'utf8', function(err, data) {
if (err) {
return console.log(err);
}
const result = data.replace('this.platform.isBrowser ?', 'this.platform.isBrowser && window.matchMedia !== undefined ?');
fs.writeFile(someFile, result, 'utf8', function(err) {
if (err) return console.log(err);
});
}); |
I know,it working for materialPage.component.ts,in my case in this component it working to but I need use snackbar in app.component.spasibo za fix.js,it fix my problem |
Adds an extra check to ensure that the current platform supports `window.matchMedia`. Fixes angular#8710.
Adds an extra check to ensure that the current platform supports `window.matchMedia`. Fixes #8710.
…8775) Adds an extra check to ensure that the current platform supports `window.matchMedia`. Fixes angular#8710.
…8775) Adds an extra check to ensure that the current platform supports `window.matchMedia`. Fixes angular#8710.
Adds an extra check to ensure that the current platform supports `window.matchMedia`. Fixes #8710.
Adds an extra check to ensure that the current platform supports `window.matchMedia`. Fixes #8710.
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. |
Bug
When I use the material for my universal project, I have this problem:
exception:
source
What is the expected behavior?
no error
What is the current behavior?
error
What are the steps to reproduce?
https://github.com/Angular-RU/angular-universal-starter/tree/material2
npm run ssr:debug
open http://localhost:4000/material
What is the use-case or motivation for changing an existing behavior?
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
"@angular/cli": "1.6.0-rc.0",
"@angular/core": "5.0.3",
"@angular/material": "5.0.0-rc.2",
"typescript": "2.4.2"
Is there anything else we should know?
The text was updated successfully, but these errors were encountered: