Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 49185

onHardwareBackButton question

$
0
0

@taylormaster wrote:

Hi!

I would like use onHardwareBackButton method, but doesnt work this code:
This code is in one controller

`starter.controller('ViewCtrl', function($scope,$state,$ionicPlatform) {...`
        $ionicPlatform.onHardwareBackButton(function() {
            if($state.current.name == 'view') { //in console **view** the state name
         		$state.go('app.comp');
        	};
        });

It must have something to work? Thanks

Posts: 2

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 49185

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>