DPRKfan2019-03-30 14:17:32
DPRKfan, 2019-03-30 14:17:32

AngularJS: Is communication between a regular controller and a directive controller correct?

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.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question