1
|
|
2
|
/*
|
3
|
* THIS IS TEMPORARY TO PATCH 2.1.1+ Core bugs
|
4
|
*/
|
5
|
|
6
|
/* tslint:disable */
|
7
|
let __compiler__ = require('@angular/compiler');
|
8
|
import { __platform_browser_private__ } from '@angular/platform-browser';
|
9
|
import { __core_private__ } from '@angular/core';
|
10
|
let patch = false;
|
11
|
if (!__core_private__['ViewUtils']) {
|
12
|
patch = true;
|
13
|
__core_private__['ViewUtils'] = __core_private__['view_utils'];
|
14
|
}
|
15
|
|
16
|
|
17
|
|
18
|
if (__compiler__ && __compiler__.SelectorMatcher && __compiler__.CssSelector) {
|
19
|
patch = true;
|
20
|
(__compiler__).__compiler_private__ = {
|
21
|
SelectorMatcher: __compiler__.SelectorMatcher,
|
22
|
CssSelector: __compiler__.CssSelector
|
23
|
}
|
24
|
}
|
25
|
|
26
|
if (patch) {
|
27
|
var __universal__ = require('angular2-platform-node/__private_imports__');
|
28
|
__universal__.ViewUtils = __core_private__['view_utils'];
|
29
|
__universal__.CssSelector = __universal__.CssSelector || __compiler__.CssSelector;
|
30
|
__universal__.SelectorMatcher = __universal__.SelectorMatcher || __compiler__.SelectorMatcher;
|
31
|
}
|
32
|
|
33
|
// Fix Material Support
|
34
|
function universalMaterialSupports(eventName: string): boolean { return Boolean(this.isCustomEvent(eventName)); }
|
35
|
__platform_browser_private__.HammerGesturesPlugin.prototype.supports = universalMaterialSupports;
|
36
|
// End Fix Material Support
|
37
|
|
38
|
// Fix Universal Style
|
39
|
import { NodeDomRootRenderer, NodeDomRenderer } from 'angular2-universal/node';
|
40
|
function renderComponentFix(componentProto: any) {
|
41
|
return new NodeDomRenderer(this, componentProto, this._animationDriver);
|
42
|
}
|
43
|
NodeDomRootRenderer.prototype.renderComponent = renderComponentFix;
|
44
|
// End Fix Universal Style
|