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