Skip to content

Commit

Permalink
fix(angular): params are assigned to props
Browse files Browse the repository at this point in the history
  • Loading branch information
manucorporat committed May 10, 2018
1 parent 95fb594 commit 7fa6e43
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions angular/src/providers/angular-delegate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 7fa6e43

Please sign in to comment.