Hi,
Can you give me some advice on how to use angular translate inside of widget configurations?
Because ng-translate works async it seems ugly wrapper code is necessary like the one below.
Only the grid widget seems to support direct usage of translate like this:
...
"columns"
: [
{
"title"
:
"{{'Tenant.Users.UserTab.FirstName' | translate}}"
,
"field"
:
"FirstName"
,
...
I couldn't get it working with other widgets. Am I missing an important detail?
$translate([
'Core.Buttons.Ok'
,
'Core.Buttons.Cancel'
]).then(
function
(t) {
$scope.colorOptions = {
buttons:
true
,
preview:
true
,
input:
true
,
messages: {
apply: t[
'Core.Buttons.Ok'
],
cancel: t[
'Core.Buttons.Cancel'
]
}
}
});
<
input
kendo-color-picker
ng-model
=
"color1"
k-options
=
"colorOptions"
/>
Thanks a lot!