What I\'m trying to do is open a modal from another component, however I keep getting this error TypeError: Cannot create property \'validator\' on string \'test1\'
If you use same component then,
HTML #
// for display purpose
COMPONENT #
import { BsModalRef } from 'ngx-bootstrap/modal/bs-modal-ref.service';
import { BsModalService } from 'ngx-bootstrap/modal';
import { ViewChild, ElementRef } from '@angular/core';
bsModalRef: BsModalRef;
constructor(private modalService: BsModalService) {}
@ViewChild('template') elementView: ElementRef;
openModalWithComponent() {
this.bsModalRef = this.modalService.show(this.elementView);
// this.bsModalRef.content.closeBtnName = 'Close';
// (click)="bsModalRef.hide()"
}