Static @bindable

@inject has a static member so that you don’t have to use a decorator.

is there a way to the the same with bindable so that you don’t have to use @bindable but instead use a static member or something to that gives you the same end result?

something like perhaps

static bindable() { return [this.field1, this.field2]; }

Recently merged PR https://github.com/aurelia/templating/pull/614 will do what you want. It will take a while to release though.

That sounds great, got a quick question and you need to forgive my ignorance here please.

Instead of using
@bindable propertyName

Would using getters and setters give me the same result from an aurelia perspective?

get propertyName()
set propertyName(newValue)

If from a aurelia perspective it flows the same throw the notification layers and binding then I can handle the changed function myself in the setter
propertyNameChange(newValue, oldValue)

That’s essentially what @bindable and @obersvable do under the hood. They patch the descriptor for propertyName with customised get/set functions.