2
<ons-navigator-toolbar right-button-icon="fa fa-thumbs-up fa-lg icon-white" on-right-button-click="ons.slidingMenu.toggleMenu();">

I want to be able to call a standard java function on-right-button-click.

I tried on-right-button-click="alert('Test');"

Kris Erickson
  • 33,454
  • 26
  • 120
  • 175
  • have a look on [right click event in javascript](http://stackoverflow.com/questions/2405771/is-right-click-a-javascript-event) – BhushanK Mar 14 '14 at 03:56

1 Answers1

1

Angularjs will look into the scope for the function. It will not look at the global window object.

However, you can attach the alert function to the $rootScope

    var myApp = angular.module('myApp', ['ngTouch', 'onsen.directives']);   

    myApp.run(function($rootScope){
        $rootScope.alert = function(message){
            window.alert(message);
        }
    });
Tamura
  • 1,788
  • 1
  • 14
  • 10