DevExtreme jQuery/JS - Call Methods

To call a UI component method, you can apply techniques described in the Call Methods topic for jQuery.

As an alternative, you can save the UI component instance in a scope property once the UI component is initialized...

JavaScript
HTML
  • function Controller ($scope) {
  • $scope.menuInstance = {};
  • $scope.menuOptions = {
  • // ...
  • onInitialized: function (e) {
  • $scope.menuInstance = e.component;
  • }
  • };
  • }
  • <div ng-controller="Controller">
  • <div dx-menu="menuOptions"></div>
  • </div>

... and call any method of the saved instance afterwards.

JavaScript
  • $scope.menuInstance.repaint();
See Also
  • API Reference.WidgetName.Methods, for example, API Reference.Menu.Methods