mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-16 01:52:19 +08:00
fix(angular): params are assigned to props
This commit is contained in:
@ -73,14 +73,15 @@ export function attachView(
|
|||||||
? location.createComponent(factory, location.length, childInjector)
|
? location.createComponent(factory, location.length, childInjector)
|
||||||
: factory.create(childInjector);
|
: factory.create(childInjector);
|
||||||
|
|
||||||
|
const instance = componentRef.instance;
|
||||||
const hostElement = componentRef.location.nativeElement;
|
const hostElement = componentRef.location.nativeElement;
|
||||||
if (params) {
|
if (params) {
|
||||||
Object.assign(hostElement, params);
|
Object.assign(instance, params);
|
||||||
}
|
}
|
||||||
for (const clazz of cssClasses) {
|
for (const clazz of cssClasses) {
|
||||||
hostElement.classList.add(clazz);
|
hostElement.classList.add(clazz);
|
||||||
}
|
}
|
||||||
bindLifecycleEvents(componentRef.instance, hostElement);
|
bindLifecycleEvents(instance, hostElement);
|
||||||
container.appendChild(hostElement);
|
container.appendChild(hostElement);
|
||||||
|
|
||||||
if (!location) {
|
if (!location) {
|
||||||
|
Reference in New Issue
Block a user