There is the following code:
ff.directive('radarMapMap', {
restrict: 'A',
require: '^^radarMap',
link: function (scope, element, attrs, mapCtrl) {
mapCtrl.setMapElement(element);
}
});
I don't understand what is the difference between require: '^radarMap' and require: '^^radarMap'. I didn't find it in documentation. Please, make me clear. Thanks in advance!
from the documentation:
^ - Locate the required controller by searching the element and its parents. Throw an error if not found.
^^ - Locate the required controller by searching the element's parents. Throw an error if not found.
Read it here: https://docs.angularjs.org/api/ng/service/$compile
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With