N
N
Nikolay Marinkin2015-07-24 16:11:40
JavaScript
Nikolay Marinkin, 2015-07-24 16:11:40

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

1 answer(s)
A
Alexander Zolotykh, 2015-07-24
@NicoBurno

For example , using events .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question