akveo / akveo/nebular

After the parent component is opened, the child component cannot be closed using Nbwindowref

Open
#3,144 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
8.1k
Forks
1.5k
PR merge metrics
No merged PRs in 30d

Description

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
}

this.windowRef = this.windowService.open(content, { buttons: buttonsconfig });

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();
}

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.