Skip to content

Commit 7fa6e43

Browse files
committed
fix(angular): params are assigned to props
1 parent 95fb594 commit 7fa6e43

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

angular/src/providers/angular-delegate.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,14 +73,15 @@ export function attachView(
7373
? location.createComponent(factory, location.length, childInjector)
7474
: factory.create(childInjector);
7575

76+
const instance = componentRef.instance;
7677
const hostElement = componentRef.location.nativeElement;
7778
if (params) {
78-
Object.assign(hostElement, params);
79+
Object.assign(instance, params);
7980
}
8081
for (const clazz of cssClasses) {
8182
hostElement.classList.add(clazz);
8283
}
83-
bindLifecycleEvents(componentRef.instance, hostElement);
84+
bindLifecycleEvents(instance, hostElement);
8485
container.appendChild(hostElement);
8586

8687
if (!location) {

0 commit comments

Comments
 (0)