on-internet
← Community

Angular 6 - display component as modal dialog from a component.ts

Stack Overflow ·

I am attempting to display a modal confirmation popup after I perform a submit action from my component. The onSubmit() method in my home.component.ts: onSubmit() { var response = new Response(1, this.name, this.phone, this.email, this.optIn, this.responses); this.questionsService.saveResponse(response).subscribe( data => response = data) // show popup confirmation dialog here this.ngOnInit(); } My confirmation-modal component: import { Component, Input } from '@angular/core'; import { NgbModal, NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; @Component({ selector: 'confirmation-modal', te

Comments

Sign in or sign up to comment and upvote.

No comments yet.