Answer the question
In order to leave comments, you need to log in
How to call a function inside a directive from the parent controller?
What we have:
A huge table inside the cells of which there is a directive.
The directive has a function that modifies the value of the model.
It is necessary to call the function of a specific directive from the controller of the page on which the directives are located.
For example, here is a pseudo-code sketched plnkr.co/edit/zYzi3Pu1tTx0nG3iPZDs?p=preview
It is necessary to call the setRandom() function of the directive in the ctrl controller loop.
How can this be done, given that there can be hundreds of directives on a page?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question