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
If I use prerender libraries for angular universal to precompile a component that uses MdButton, it fails as soon as the compiled button.js module is loaded because of the presence of a global Event object that doesn't exist in node.
Because of the HostListener decorator, the type information for that method gets preserved as follows:
__decorate([core_1.HostListener('click',['$event']),__metadata('design:type',Function),__metadata('design:paramtypes',[Event]),// <-- there's the problem__metadata('design:returntype',void0)],MdAnchor.prototype,"haltDisabledEvents",null);
Which version of Angular and Material, and which browser and OS does this issue affect?
Did this work in previous versions of Angular / Material?
Please also test with the latest stable and snapshot versions.
Beta.1 and Beta.2.
Other information
(e.g. detailed explanation, stacktraces, related issues, suggestions how to fix)
ReferenceError: Could not require 'angular-cli-build.js': Event is not defined
at project/node_modules/@angular2-material/button/button.ts:121:37
at Object.<anonymous> (project/node_modules/@angular2-material/button/button.ts:94:1)
at Module._compile (module.js:413:34)
at Object.Module._extensions..js (module.js:422:10)
at Module.load (module.js:357:32)
at Function.Module._load (module.js:314:12)
at Module.require (module.js:367:17)
at require (internal/module.js:16:19)
at Object.<anonymous> (project/src/client/app/issue-cli.ts:7:1)
at Module._compile (module.js:413:34)
The text was updated successfully, but these errors were encountered:
Note: for support questions, please use one of these channels:
https://github.com/angular/material2/blob/master/CONTRIBUTING.md#question.
This repository's issues are reserved for feature requests and bug reports.
Bug
If I use prerender libraries for angular universal to precompile a component that uses
MdButton
, it fails as soon as the compiled button.js module is loaded because of the presence of a globalEvent
object that doesn't exist in node.This line is the offender: https://github.com/angular/material2/blob/d4a3cde52ba736da64285bdfaf039129d0dd8312/src/components/button/button.ts#L122
Because of the
HostListener
decorator, the type information for that method gets preserved as follows:Did this work in previous versions of Angular / Material?
Please also test with the latest stable and snapshot versions.
Beta.1 and Beta.2.
(e.g. detailed explanation, stacktraces, related issues, suggestions how to fix)
The text was updated successfully, but these errors were encountered: