0

I want to create a dynamic set of check boxes using Angular Material, the documentation example, but that grows dynamically.

enter image description here

It should bind like on the normal checkbox, click on the link I have added to the documentation. it is not dynamically binding to the check boxes, as it does manually.

See my stackblitz sandbox here. (forgot the save, tired; feel free to focus on the problem! I may rebuild later!)

The problem seemed trivial, but I am stuck. I have been doing research, testing samples, but none of them actually solve the problem. What called my attention are so many codes that claim to solve, but when you try, they do not! 🤣😂😁 The issue is using formbuilder dynamically, using arrays.

I am able to advance in several directions, but, what I want. Of course, I have enter the tags manually, as in the documentation; but I want to reuse the code, and dynamically adapt as new options are added, without needing to change locally all the code.

I am building an app on Non violent communication, for my next ebook! 🤗🤗🤗

===

Note I have decided to no longer use this option, feel free to solve the problem anyway, I will be glad to participate, and write a Medium article, and make the contributions! 🤗🤗🤗 See my Medium profile See the app here

I am always glad to solve problems, it is my high!

7
  • 1
    Your code from stackblitz sandbox is missing Commented Jul 21, 2022 at 13:11
  • Click on the links! Commented Jul 21, 2022 at 13:12
  • It did not save, guess I am tired Commented Jul 21, 2022 at 13:13
  • I guess you can play with the sandbox, and sand suggestion. Later, I may add another sandbox! thanks! Commented Jul 21, 2022 at 13:13
  • 1
    Maybe this can be useful for you. I didn't used FormArray, but the code for constructing the checkboxes could be used with dynamic options. Commented Jul 21, 2022 at 16:00

1 Answer 1

1

Here is the code where I didn't used FormArray, but the code for constructing the checkboxes could be used with dynamic options.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.