forio Toggle navigation

Flow.js: Operations

Flow.js provides a data binding not only between model variables and your project's user interface, but also between model operations and your project's user interface.

By default, all HTML elements update for any call to an operation. However, you can prevent the user interface from updating -- either for all operations or for particular operations -- by setting the silent property when you initialize Flow.js. See more on additional options for the Flow.initialize() method.

How do I ... ?

  • Call an operation from the model when the run is first created?
  • Call an operation from the model on user action?
  • Call multiple operations at once?
    • Use the | (pipe) character to chain operations. Operations are called serially, in the order listed.
  • Call an operation each time a model variable changes?
    • Bind the variable, use the Variables Channel to subscribe to the variable, and then call the operation in the callback function for the subscription. See details in the How To example.
  • Call an operation and update a UI element afterwards?
    • Bind the variable, use the Operations Channel to subscribe to the operation, and then update the UI element in the callback function for the subscription. See details in the How To example.

Learn More