0

New to AngularJS in Supersonic/Steroids/Appgyver

I know this is not working, but are there some variants that would work:

<super-navbar-button side="left">
    {{ titleButtonLeft  }}
</super-navbar-button>
<super-navbar-button side="right">
    {{ titleButtonRight }}
</super-navbar-button>

while

$scope.titleButtonLeft = "Left"
$scope.titleButtonRight = "Right"

Alternatively, change the title by code on super-navbar-buttons without removing and adding them.

Can't seem to access the buttons specifically with, for example:

supersonic.ui.navigationBar.buttons.right[0]

or

supersonic.ui.views.current.navigationBar.buttons.left[0]

even though they should reside somewhere therein, according to:

http://docs.appgyver.com/supersonic/guides/ui/native-components/navigation-bar/#programmatic-apis

Any suggestions?

Deukalion
  • 2,516
  • 9
  • 32
  • 50

1 Answers1

0

Here is an example of how I am updating navbar buttons, including text.

// setup buttons
    var leftButton = new supersonic.ui.NavigationBarButton({
        title: "Previous",
        onTap: function() {
            // do something
        }
    });

// setup buttons
    var rightButton = new supersonic.ui.NavigationBarButton({
        title: 'Next',
        onTap: function() {
            // do something
        }
    });

// setup buttons
    var original = {
        title: 'Nav Title',
        overrideBackButton: false,
        buttons: {
            left: [leftButton],
            right: [rightButton]
        }
    };


supersonic.ui.navigationBar.update(original);

There is also discussion about this kind of issue on the Muut Forum.

area28
  • 1,425
  • 1
  • 9
  • 11