A
A
Arthur2016-02-14 20:43:25
JavaScript
Arthur, 2016-02-14 20:43:25

How to call a controller function in nested directives?

Hey guys.
Here he decides to bring his underapplication in angular to a "component view"))
, but there was a problem how to call the function from the MainCtrl controller - main.select(cabinet, time)
plnkr.co/edit/b7K4ay0P6tKVeY4TuqGm
there is of course an option to pass the function through all layers of directives, but maybe there is a better way?
Threat do not kick! ))

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
Nicholas, 2016-02-14
@healqq

The first option is require , I think it will suit you.
The second option is to remove the interaction in the service layer.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question