Require controller
If you want to share the same controller instance, use require.
requires the provision of another directive, and then includes its controller as a parameter of the communication function. Therefore, if you have two directives for one element, your directive may require another directive and access its management methods. For this, ngModel is usually used.
^require, with the addition of a carriage, checks the elements above the directive in addition to the current element, in order to try to find another directive. This allows you to create complex components where the "subcomponents" can interact perfectly with the parent component through their controller. Examples may include tabs where each panel may link to common tabs to handle switching; an accordion set can ensure that only one is open at a time; and etc.
, . require - .
angularjs
angular DI ?