angularjs - Onsenui app add custom function on navigator click -
i develop onsenui app on monaca , i'd add custom function on on-right-button-click event
:
<ons-navigator title="mytitlte" right-button-icon="fa fa-lg fa-refresh" on-right-button-click="refresh()" page="pages/msg.html"> </ons-navigator>
my refresh()
function defined in controller
moduleapp.controller('myctrl', ['$scope', '$http', function ($scope, $http) { // refresh items $scope.refresh = function () { .... }; }]);
thanks help
you need set "mycontroller" on navigator or above navigator.
<ons-navigator ng-controller="mycontroller" title="mytitlte" right-button-icon="fa fa-lg fa-refresh" on-right-button-click="refresh()" page="pages/msg.html"> </ons-navigator>
Comments
Post a Comment