ng-click='goBack()'
'a bastığımda geri dön düğmesini kullanıyorum. Tarayıcıdaki URL'yi http://app:8888/#/main/payments'dan http://app:8888/#/main/products/7'a dönüştürebilir, bu da geriye dönmek istediğim doğru yoldur, ancak sorun görüntünün buradan geçiş yapmamasıdır.İyonik program durumuna göre geri gitme
Oraya gitmek veya $ionicHistory.goBack();
'dan sonra window.location.reload yapmak için yenileme düğmesine basmalıyım.
Bir önceki sayfaya geçmek istediğim sayfanın tamamını yeniden yüklemek istemiyorum.
bu
bu benim denetleyicisi.controller('paymentsController', function($scope, $localStorage, $log, $state, $window, $ionicHistory){
$scope.goBack = function(){
$ionicHistory.goBack();
}
})
benim html
<div class="row">
<div class="col col-25">
<button ng-click="goBack()" class="button button-large button-block button-royal">Go Back</button>
</div>
</div>
olan bu yardım edersen bilmiyorum benim app.js olduğunu.
// Ionic Starter App
// angular.module is a global place for creating, registering and retrieving Angular modules
// 'starter' is the name of this angular module example (also set in a <body> attribute in index.html)
// the 2nd parameter is an array of 'requires'
angular.module('starter', ['ionic', 'starter.controllers', 'starter.services', 'ngStorage'])
.run(function($ionicPlatform) {
$ionicPlatform.ready(function() {
// Hide the accessory bar by default (remove this to show the accessory bar above the keyboard
// for form inputs)
if(window.cordova && window.cordova.plugins.Keyboard) {
cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true);
}
if(window.StatusBar) {
StatusBar.styleDefault();
}
});
})
.config(function($stateProvider, $urlRouterProvider){
//$ionicConfigProvider.views.transition('none');
$urlRouterProvider.otherwise('/');
$stateProvider
.state('login',{
url: '/',
templateUrl: 'templates/login.html',
controller: 'loginController'
})
.state('main', {
url: '/main',
templateUrl: 'templates/main.html',
controller: 'mainController',
abstract: true
})
.state('main.categories', {
url: '/categories',
views: {
'categories': {
templateUrl: 'templates/categories.html',
controller: 'categoriesController'
}
}
})
.state('main.products', {
url: '/products/:productId',
views: {
'products': {
templateUrl: 'templates/products.html',
controller: 'productsController'
}
}
})
.state('main.payments', {
url: '/payments',
views: {
'payments': {
templateUrl: 'templates/payments.html',
controller: 'paymentsController'
}
}
})
})
olası yinelenen [altbilgi (iyonik çerçevede) bir arka düğme oluşturmak için nasıl?] (http://stackoverflow.com/sorular/22739459/how-to-create-a-geri-düğme-in-the-altbilgi iyonik-çerçeve) – callmekatootie