This repository was archived by the owner on Apr 12, 2024. It is now read-only.
Request: Human-readable alternatives to '@=&' in custom directive scope:{} definitions #9125
Closed
Description
I've been using Angular part-time for over a year, and I still have to look up the meaning of @
, =
, and &
in the scope: {}
definitions every time I read or write it.
How about:
scope: {
// These four are equivalent
title: '@',
title: '@title',
title: 'text',
title: 'text title',
// These four are equivalent
model: '=',
model: '=model',
model: 'property',
model: 'property model',
// These four are equivalent
onMessage: '&',
onMessage: '&onMessage',
onMessage: 'expression',
onMessage: 'expression onMessage'
}
Obviously, the syntax and naming is up for debate. You guys will have a much better understanding of the bigger picture.