0

I have a list of checkboxes - that populate a tag textarea - when the user remove a tag I also want to uncheck the checkbox

When the user navigates away and come back the checkboxes should maintain the state they were in - ie check against the tags and see if they match

So I need

  1. Click state to pouplate tags

  2. initial check to see if the checkbox should be checked or not - the scope of the checkboxes is killed by navigating away unless I rootScope it maybe?

  3. Delete tag unchecks the check box

  4. Only 5 checkboxes in a list can be checked the 6th would return no.

  5. Needs to be a select all with above taken into account

I am really quite lost in how to architect this at the moment

going from click to change to model to checked....

many thanks for any help

2
  • You should at least give it a try so you have some code to show and work with. Try taking one problem at a time instead of them all at once :). Commented Apr 13, 2016 at 15:41
  • This angular directive should do the trick, or at least put you on the right tracks to implement your own solution : https://vitalets.github.io/checklist-model/ Commented Apr 13, 2016 at 16:03

1 Answer 1

1

try to do the next thing - create an object { clicked : true, label: label} when you goes throught ng-repeat you have an object to render and state, when somebody delete label - you should just add whole object to handler and there change checkbox state tie to needed element.

P.S. If you add some code we can work with your stuff.

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.