When you say “section” do you mean a JS function? There are two things you can do:
so you would do
Flow.channel.variables.subscribe('myVariable',
function() { console.log('called!'); } );
- Flow triggers 2 events on the actual DOM element you can listen on: “update.f.model” and “f.convert”. For instance, say you had a domElement like
<div data-f-bind="myvariable | $#,###" id="mydiv"> </div>
i.e., you take the model variable and apply a ‘formatter’ converter to it (see here or more info on converters). You can then do
$("#mydiv").on('update.f.model', function (data) {
console.log(data); // will have the unformatted model variable
});
$("#mydiv").on('f.convert', function (data) {
console.log(data); // will have the formatted model variable
});
Does that answer your question?