Let\'s say I have A and B reusable components. I want B to invoke a method on A - of course only if B is a child of A. Also - I want B to be used as a standalone component (with
You can conditionally require another directive prefixing it with the question mark: require: "^?A". Then you can test for the controller being not-null to see if you were invoked inside a parent directive or as a standalone.