Skip to content

Commit cb50fd8

Browse files
committed
Upgrade to same TypeScript version and add explicit info on ServerPlatform injection
1 parent 6998f2e commit cb50fd8

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "angular-ssr",
3-
"version": "0.10.22",
3+
"version": "0.10.23",
44
"description": "Angular server-side rendering implementation",
55
"main": "build/index.js",
66
"typings": "build/index.d.ts",
@@ -68,7 +68,7 @@
6868
"reflect-metadata": ">=0.1.10",
6969
"rxjs": ">=5.0.1",
7070
"zone.js": ">=0.8",
71-
"typescript": ">=2.1.0",
71+
"typescript": ">=2.3.2",
7272
"webpack": ">=2.3.0"
7373
},
7474
"dependencies": {
@@ -114,7 +114,7 @@
114114
"reflect-metadata": ">=0.1.10",
115115
"ts-jest": "^20.0.4",
116116
"tslint": "4.4.2",
117-
"typescript": ">=2.2.0",
117+
"typescript": ">=2.3.2",
118118
"webpack": ">=2.4.1",
119119
"zone.js": ">=0.8.9"
120120
},

source/platform/platform.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import {
44
CompilerOptions,
55
Injectable,
66
Injector,
7-
Inject,
87
NgModuleFactory,
98
NgModuleRef,
109
NgZone,
@@ -25,7 +24,7 @@ export class ServerPlatform implements PlatformRef {
2524

2625
private destroyers = new Array<() => void>();
2726

28-
constructor(@Inject(Injector) public injector: Injector) {}
27+
constructor(public injector: Injector) {}
2928

3029
compileModule<M>(moduleType: Type<M>, compilerOptions: CompilerOptions | Array<CompilerOptions> = []): Promise<NgModuleFactory<M>> {
3130
const compiler = this.getCompiler(compilerOptions);
@@ -101,3 +100,8 @@ export class ServerPlatform implements PlatformRef {
101100
destroyers.forEach(handler => handler());
102101
}
103102
}
103+
104+
Object.assign(ServerPlatform, {
105+
decorators: [{type: Injectable}],
106+
ctorParameters: () => [{type: Injector}]
107+
});

0 commit comments

Comments
 (0)