Notice: The Monaca & Onsen UI Community Forum is shutting down.

For Onsen UI bug reports, feature requests and questions, please use the Onsen UI GitHub issues page. For help with Monaca, please contact Monaca Support Team.

Thank you to all our community for your contributions to the forum. We look forward to hearing from you in the new communication channels.

How to make button to pushing a page using a value of an array inside ng-click?

  • I was trying to create a few buttons using an array in Angularjs.
    My question is how to put a value like function or code like myNavigator.pushPage(‘page’) inside ng-click from an array and make the button work to navigating

    This is my code


    <template id="home">
    <div class="left">
    <div class="center">Home</div>
    <ons-list ng-repeat="x in data">
    <ons-list-item ng-click="">


    var module = angular.module('app', ['onsen']);
    module.controller('Ctrl', ['$scope',  function ($scope){
      $scope.pg1 = function(){
      $scope.pg2 = function(){
      $scope.pg3 = function(){
    	$scope.tombol = [
      {link:'pg1()', data:'Tombol 1'},
      {link:'pg2()', data: 'Tombol 2'},
      {link:'pg3()', data: 'Tombol 3'}