A newer version of this page is available. Switch to the current version.

Get a Widget Instance

To get a UI component instance, save it in a scope property once the UI component is initialized:

function Controller ($scope) {
    $scope.menuInstance = {};
    $scope.menuOptions = {
        // ...
        onInitialized: function (e) {
            $scope.menuInstance = e.component;    

Alternatively, you can apply techniques from the jQuery article.

See Also