lionelB
lionelB

Reputation: 209

What does ? mean in a directive's require property

Some directives use some cryptic chars in their require property, like the angular ui dropdow

require:"?^dropdown"

I'm ok with ^ which mean parent but I can't figured out what ? means.

Thank you!

Upvotes: 3

Views: 417

Answers (2)

Kevin
Kevin

Reputation: 825

As the code says:

[
    'siblingDirectiveName', 
    '^parentDirectiveName', 
    '?optionalSiblingDirectiveName', 
    '?^optionalParentDirectiveName'
]

Upvotes: 1

nilsK
nilsK

Reputation: 4351

check the docs: $compile 'require'

the directive docs have been moved there a while ago

have a nice weekend!

Upvotes: 1

Related Questions