I have to create a modal for one of my website. I have implemented ngx-bootstrap modal for that. I have defined the component in my bootstrap. It is running perfectly but when I'm viewing the console it is showing error message as
The selector "app-subscription" did not match any elements
Below is the code snippet for subscription.component.ts
export class SubscriptionComponent implements OnInit {
closeBtnName: string;
public email_id;
subscribed:Boolean= false;
showsubscribe: Boolean = true;
public emailFormControl = new FormControl('', [ Validators.required, Validators.pattern(EMAIL_REGEX)]);
constructor( public bsModalRef: BsModalRef, private
submit_service:
SubmitService, private modalService: BsModalService) { }
ngOnInit() {
}
}
and for the home.component.ts
if(this.router.url.includes('subscribe')){
this.bsModalRef = this.modalService.show(SubscriptionComponent)
this.bsModalRef.content.closeBtnName = 'Close'
}
As per the ngx-bootstrap documentation I have added that in my entryComponents. Code snippet for app.module.ts
bootstrap: [AppComponent, SubscriptionComponent]
Please suggest me a fix for that.