Open adyba opened 8 years ago
Can you please provide your failing code?
I believe
scope: {
modelDate: "=ngModel",
title: "=",
subTitle: "=",
buttonOk: "=",
buttonCancel: "="
},
should be
scope: {
modelDate: "=ngModel",
title: "@",
subTitle: "@",
buttonOk: "@",
buttonCancel: "@"
},
sorry for the mess ;)
Thanks for your suggestion. Using @
instead of =
should help with performance optimization so I'm going to add this to a backlog and implement it in the future.
But the current version works as expected. There seems to be an oversight on your side: =
attribute requires an expression, not an interpolated string. You should use string expression or scope variable:
<ion-item ion-datetime-picker ng-model="datetimeValue" title="'This is a string'"></ion-item>
<ion-item ion-datetime-picker ng-model="datetimeValue" title="titleTranslation"></ion-item>
For some reasons I'm having some difficulties to get text values inside the directive scope. Once I have changed the binding method from bidirectional "=" to one-way text binding "@" it works as expected.