0

I am implementing a system using MEAN Stack framework. There is a header component. In the header component I have designed a button called 'Post'. When I click that button it should open a window in which the content is a form. That form is designed in the 'FormComponent'.

This is my header.component.html.

<button (click)="openWindow()" nbButton type="button" size="small">Post</button> 

header.component.ts

openWindow() {
 this.windowService.open(FormComponent, { title: `Post` });
}

FormComponent.html

<form>
  First name:<br>
  <input type="text" name="firstname"><br>
</form>

When I click the 'Post' button it opens the window. But it does not show the content in the .html file in 'FormComponent'. Can anyone show me the place where I have gone wrong?

RMD
  • 311
  • 1
  • 7
  • 22

1 Answers1

0

You can find the error by using the browser console. Your error can be happened because you don't have added the FormComponent as an entryComponent. So add the FormComponent to the entryComponents array in the module.ts file by referring https://codinglatte.com/posts/angular/entry-components-angular/

Ravindu Perera
  • 307
  • 2
  • 5