Answer the question
In order to leave comments, you need to log in
AngularJS: Is communication between a regular controller and a directive controller correct?
Hello
New to frontend and AngularJS. Version 1.4
I have a question regarding the correct design patterns.
In my project, I have a regular controller that is responsible for a specific page on the site. This page has a directive, which in turn has its own controller. The normal page controller communicates with the directive controller in both directions 'scope ='.
My question is: is this design correct? If not, what are the alternatives?
The purpose of creating a separate directive was not to duplicate the same HTML / JS code on many pages.
Thanks
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