angular-recursion
angular-recursion copied to clipboard
Bug when using require?
require: ['dhLayers'],
controller: dh.layer.layersDirectiveCtrl,
controllerAs: 'layersCtrl',
I want to use require: ['dhLayers','^?dhLayers'], So that ctrls in link method => ctrls[0] == current layers control, ctrls[1] == parent layers control.
Instead the result I get is ctrls[0] is equal to ctrls[1] and the value represent the current directive controller.
I haven't actually tried this but the problem might be:
https://github.com/angular/angular.js/blob/0d55298b56fcd67570374441c0bba76c0bf0d1f0/src/ng/compile.js#L339
- *
?^^
- Attempt to locate the required controller by searching the element's parents, or pass -
null
to thelink
fn if not found.
^? searches current element and parent elements. I need only parent search.