From 7fa6e430693a33d127ee9c3ce23f1efcf67ffb98 Mon Sep 17 00:00:00 2001 From: "Manu Mtz.-Almeida" Date: Thu, 10 May 2018 21:28:19 +0200 Subject: [PATCH] fix(angular): params are assigned to props --- angular/src/providers/angular-delegate.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/angular/src/providers/angular-delegate.ts b/angular/src/providers/angular-delegate.ts index b6f7801c3f..61450ae0d6 100644 --- a/angular/src/providers/angular-delegate.ts +++ b/angular/src/providers/angular-delegate.ts @@ -73,14 +73,15 @@ export function attachView( ? location.createComponent(factory, location.length, childInjector) : factory.create(childInjector); + const instance = componentRef.instance; const hostElement = componentRef.location.nativeElement; if (params) { - Object.assign(hostElement, params); + Object.assign(instance, params); } for (const clazz of cssClasses) { hostElement.classList.add(clazz); } - bindLifecycleEvents(componentRef.instance, hostElement); + bindLifecycleEvents(instance, hostElement); container.appendChild(hostElement); if (!location) {