Update common client packages
This commit is contained in:
parent
d4d0f3ba0e
commit
41cde76bbf
|
@ -140,7 +140,7 @@
|
||||||
"webpack-cli": "^5.0.1",
|
"webpack-cli": "^5.0.1",
|
||||||
"webtorrent": "1.8.26",
|
"webtorrent": "1.8.26",
|
||||||
"whatwg-fetch": "^3.0.0",
|
"whatwg-fetch": "^3.0.0",
|
||||||
"zone.js": "~0.12.0"
|
"zone.js": "~0.13.0"
|
||||||
},
|
},
|
||||||
"dependencies": {}
|
"dependencies": {}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import {
|
import {
|
||||||
ApplicationRef,
|
ApplicationRef,
|
||||||
ComponentFactoryResolver,
|
|
||||||
ComponentRef,
|
ComponentRef,
|
||||||
|
createComponent,
|
||||||
EmbeddedViewRef,
|
EmbeddedViewRef,
|
||||||
Injectable,
|
Injectable,
|
||||||
Injector,
|
Injector,
|
||||||
|
@ -16,15 +16,17 @@ export class DynamicElementService {
|
||||||
|
|
||||||
constructor (
|
constructor (
|
||||||
private injector: Injector,
|
private injector: Injector,
|
||||||
private applicationRef: ApplicationRef,
|
private applicationRef: ApplicationRef
|
||||||
private componentFactoryResolver: ComponentFactoryResolver
|
|
||||||
) { }
|
) { }
|
||||||
|
|
||||||
createElement <T> (ofComponent: Type<T>) {
|
createElement <T> (ofComponent: Type<T>) {
|
||||||
const div = document.createElement('div')
|
const div = document.createElement('div')
|
||||||
|
|
||||||
const component = this.componentFactoryResolver.resolveComponentFactory(ofComponent)
|
const component = createComponent(ofComponent, {
|
||||||
.create(this.injector, [], div)
|
environmentInjector: this.applicationRef.injector,
|
||||||
|
elementInjector: this.injector,
|
||||||
|
hostElement: div
|
||||||
|
})
|
||||||
|
|
||||||
return component
|
return component
|
||||||
}
|
}
|
||||||
|
|
3093
client/yarn.lock
3093
client/yarn.lock
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue