I have two components, one is parent and the other is child component . I'm using Nebular ui to create a window (using nbWindowService.open(ChildComponent). There's a form in the child component and I need to get that data back into the parent component for processing.
When I close the window opened by the parent component on the child component, using this.windowref.close() does not work!!
angular.cli :12.1
nebular:8.0.0
ngx-admin:8.0.0
my code:
parent component:
constructor(
public windowRef: NbWindowRef,
private windowService: NbWindowService
}
I have two components, one is parent and the other is child component . I'm using Nebular ui to create a window (using nbWindowService.open(ChildComponent). There's a form in the child component and I need to get that data back into the parent component for processing.
When I close the window opened by the parent component on the child component, using this.windowref.close() does not work!!
angular.cli :12.1 nebular:8.0.0 ngx-admin:8.0.0
my code:
parent component: constructor( public windowRef: NbWindowRef, private windowService: NbWindowService }
child component:
@Input() windowref: NbWindowRef; @Output() afterupdate = new EventEmitter();
constructor(
public windowRef: NbWindowRef,
private windowService: NbWindowService) { }
close() {
this.windowRef.close();}
async update() { this.afterupdate.emit(); this.close(); }