trimox / angular-mdc-web

Angular wrapper for Material Design (Web) Components
https://trimox.github.io/angular-mdc-web
MIT License
517 stars 87 forks source link

Constructor in example of FormDialog belongs to ConfirmationDialog #2143

Closed yohaoquan closed 4 years ago

yohaoquan commented 4 years ago

Describe the bug In the sample, the constructor in the Form Dialog's dialog-form.ts belongs to Confirmation dialog.

To Reproduce check the sample code for Form Dialog: Link: angular-mdc-web/demos/src/app/components/dialog/dialog.ts :L354

constructor(public dialogRef: MdcDialogRef<DialogConfirmation>, @Inject(MDC_DIALOG_DATA) public data: DialogData) { }

Expected behavior constructor(public dialogRef: MdcDialogRef<DialogForm>) { } What Angular MDC version are you using? N/A What OS are you using?: N/A What browser(s) is this bug affecting?: N/A Additional context This is probably not the best place to put it but I encountered more errors following your document to create a form dialog. Namely, I am getting src/app/signup-dialog/dialog-form.html:7:17 - error NG8002: Can't bind to 'formGroup' since it isn't a known property of 'form'. I am still new into web development so I am sorry for not providing a clearer explanation of the problem. Bravo for your work.

Edit: Added link to said line

trimox commented 4 years ago

@SleevefishYoo Thanks for letting me know. I'll fix dialog doc in a few.

src/app/signup-dialog/dialog-form.html:7:17 - error NG8002: Can't bind to 'formGroup' since it isn't a known property of 'form'.

You may need to import CommonModule in a shared or root module.

import {CommonModule} from '@angular/common';

@NgModule({
  imports: [
    CommonModule,
   ...
  ],