- I've got a grid.
- In each row there's a custom checkbox directive(d1).
- I've got another custom checkbox directive(d2) which I would like to have the ability to check or uncheck all the other checkboxes in the grid.
- Also, when all the d1 directives are checked manually in the grid, d2 should also be checked.
- And if I click on d2 then uncheck any of the d1s in a row, d2 should be unchecked.
- The checkboxes are images binded to a real checkbox which is hidden.
I don't want to 'require' d2 in d1 because it doesn't make sense in my project.
I don't want to use jQuery either.
So I guess I should use service/factory.
What's the most acceptable way to design and implement this functionality?
Aucun commentaire:
Enregistrer un commentaire