You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Works fine with @inputs, the .next method for an @input member works fine, but also providing callback functions for @output does nothing.
in lazy-loaded component:
@Input()
public myInput: any;
@Output()
public myOutput: EventEmitter<void> = new EventEmitter();
in outer program itself :
public initMyComponent(p_componentRef: ICreatedComponentInterface): void {
p_componentRef.next({
myInput: this.someinfo,
myOutput: function(): void {
console.log('hello'); // does not work
}
});
}
The text was updated successfully, but these errors were encountered:
publiconLazyInit(ref: any){letnum=0;setInterval(()=>{ref.next({myInput: num++});// this will change the input passing into the lazy loaded component},1000);// this will subscribe to the output events emitted from the lazy loaded componentref.componentRef.instance['myOutput'].subscribe((val: number)=>{console.log('inside subscribe',val);})}
@boltex Subscribing to the events on the event emitter variable from the lazy-loaded component instance worked for me. Hope this helps.
Works fine with @inputs, the .next method for an @input member works fine, but also providing callback functions for @output does nothing.
in lazy-loaded component:
in outer program itself :
The text was updated successfully, but these errors were encountered: