These are chat archives for ngUpgraders/ng-forward

19th
Nov 2015
Chris Rowe
@cwmrowe
Nov 19 2015 13:58
Is it possible to get access to a controller from a parent directive which is not written with ngForward?
Tim Kindberg
@timkindberg
Nov 19 2015 14:00
@david-gang events property is removed. It's now called outputs and it's the same as Output decorator. It's your preference at this point.
@cwmrowe angular.element('selectorforparentdirective').controller('directive name')
Something like that
David Gang
@david-gang
Nov 19 2015 14:32
@timkindberg so the readme should be corrected
i will create a pr
David Gang
@david-gang
Nov 19 2015 14:51
created #90
Chris Rowe
@cwmrowe
Nov 19 2015 14:58
@timkindberg does ng-forward support hierarchical injectors at all?
Chris Rowe
@cwmrowe
Nov 19 2015 16:39
OK, so I am replicating directive require functionality with this
constructor($element){
var parentElement= $element.parents('parent-directive');
this.parentController= angular.element(parentElement).controller('parentDirective');
}
It works but feels a bit hacky, any thoughts...?
PS. Thanks for all your help :-)