Update common client packages

pull/5817/head
Chocobozzz 2023-05-23 09:00:58 +02:00
parent d4d0f3ba0e
commit 41cde76bbf
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
3 changed files with 1856 additions and 1251 deletions

View File

@ -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": {}
}

View File

@ -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
}

File diff suppressed because it is too large Load Diff