how to go to another page with a button click with ionic?

后端 未结 12 1806
粉色の甜心
粉色の甜心 2020-12-31 10:26

I have been trying to work with the code, I added the button but I don\'t know how to link it to another page when clicking on it.

12条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-31 10:39

    you can also use angular to do this for you:

    
    

    You would need to have a controller to and define doSomething()

    $scope.doSomething=function(somebody){
        ...insert code here
    }
    

    If you needed to change your state, the inject $state into your controller and use $state.go(stateName)

    ref: https://github.com/angular-ui/ui-router/wiki

提交回复
热议问题