I have the following element in html file:
<require from="_controls/time-slot-slider"></require>
<time-slot-slider id="zeitraum" min="0" max="24" length="4" value="4"
value.two-way="functionConfig.startTime" if.bind="functionConfig.isAutomatic === true"
readonly.bind="!mayFunctionTestEditTime"></time-slot-slider>
Custom element is here(time-slot-slider.html):
<template class="range-slider time-slot">
<div>${duration}</div>
<input type="range" min.bind="min" max.bind="maxStart" step.bind="step" value.bind="value">
</template>
and time-slot-slider.ts :
import { bindable, customElement } from 'aurelia-templating'
import moment from 'moment/moment'
import Moment = moment.Moment
@customElement('time-slot-slider')
export class TimeSlotSlider {
@bindable public min: number = 0.0
@bindable public max: number = 24.0
@bindable public step: number = 0.5
@bindable public value: number = 0.0
@bindable public length: number = 4.0
public get maxStart (): number {
return this.max - this.length
}
public get from (): Moment {
return TimeSlotSlider.numberToMoment(this.value)
}
....
But readonly.bind doesn't work. I tried to bind readonly by
@bindable readOnly: boolean
but I didn't have any success. How can I fix it?