Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nz-checkbox-group not rendering inside <form> tag #3542

Closed
anantoghosh opened this issue Jun 5, 2019 · 2 comments
Closed

nz-checkbox-group not rendering inside <form> tag #3542

anantoghosh opened this issue Jun 5, 2019 · 2 comments

Comments

@anantoghosh
Copy link

Reproduction link

https://stackblitz.com/edit/ng-zorro-antd-start-uespdt?file=src/app/app.component.html

Steps to reproduce

Define nz-checkbox-group in a simple html form tag.

What is expected?

Check box group to appear as normal.

What is actually happening?

No checkbox is created. They are missing in the DOM.

Environment Info
ng-zorro-antd 7.5.0
Browser Chrome 74, Firefox 67
@vthinkxie
Copy link
Member

vthinkxie commented Jun 5, 2019

@anantoghosh I think it would better to check the console and you will see your app is totally error, you can get more info in angular doc about reactive form

ERROR
Error: If ngModel is used within a form tag, either the name attribute must be set or the form
control must be defined as 'standalone' in ngModelOptions.

Example 1: <input [(ngModel)]="person.firstName" name="first">
Example 2: <input [(ngModel)]="person.firstName" [ngModelOptions]="{standalone: true}">

@anantoghosh
Copy link
Author

Oh, ok @vthinkxie , sorry for the trouble. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants