This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
Can't require a parent directive of an element with the same directive. #4518
Closed
Description
Just as the ngForm
directive is able to be nested and communicate with parent ngForm
controllers, there should be a clear method to optionally require a parent directive in the case where the current element contains the same directive. Currently, a require
value of ^?myDir
will result in the current controller being injected into the link
function of the myDir
directive. It would be very helpful if a require
value such as ^^?myDir
would ignore the current element/controller and use the same methodology used in the ngForm
directive, effectively: element.parent().controller( 'myDir' );
.