0

Supersonic/Steroids/Appgyver の AngularJS の新機能

これが機能しないことはわかっていますが、機能するバリアントがいくつかあります。

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

その間

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

または、スーパー ナビゲーション バーのボタンを削除したり追加したりせずに、コードでタイトルを変更します。

たとえば、具体的にはボタンにアクセスできないようです。

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

また

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

次のように、それらはその中のどこかに存在するはずですが、

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

助言がありますか?

4

1 に答える 1

0

テキストを含むナビゲーションバーボタンを更新する方法の例を次に示します。

// 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);

この種の問題については、Muut フォーラムでも議論されています。

于 2015-05-06T02:48:54.400 に答える