Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie

Hi all,

I have a http route that render a template with some variables.

{"foo":"bar"}

In template I want to use variables that returned from controller as a javascript variable.

For example, I want to log foo

console.log(foo);


But I can not find where foo is

Please help me to use controller variables in javascript

Awatar
Odrzuć

<script>

var x_axis = <t t-esc="value_comes_from_controller"/>;

</script>

Reference: http://bit.ly/odoo-web-controller

Powiązane posty Odpowiedzi Widoki Czynność
0
sie 23
194
1
cze 23
2902
1
lut 22
2872
1
lis 20
4927
0
sie 18
5845