0
1ページのアプリケーションで作業しています。可能であれば、前のページに戻るために非常に簡単なコードを探していますスワイプ。私は多くを見てきましたが、すべてが非常に複雑で非常に異なっているようです。右と左にスワイプして角を使ってページ上を4番目に移動する簡単なコード
私がしたいのは、スワイプでページから4番目に戻ることです。本当に複雑すぎるものはありません。おそらくng-swipe-right
とng-swipe-left
を使用していますか?また、これはガーデンセンターのアプリで、在庫の一部を検索することができます。ここで
私のindex.htmlコードです:
var app = angular.module('myApp',[
'ngRoute',
'myApp.Home',
'myApp.Search',
'myApp.Inventory',
'myApp.Sub',
'myApp.Details'
]);
app.config(function($routeProvider){
$routeProvider.
when('/home', {
templateUrl: 'templates/home/home.html',
controller: 'HomeController'
}).
when('/search', {
templateUrl: 'templates/search/search.html',
controller: 'SearchController'
}).
when('/inventory', {
templateUrl: 'templates/inventory/inventory.html',
controller: 'InventoryController'
}).
when('/coupons', {
templateUrl: 'templates/coupons/coupons.html'
}).
when('/sales', {
templateUrl: 'templates/sales/sales.html'
}).
when('/events', {
templateUrl: 'templates/events/events.html'
}).
when('/locations', {
templateUrl: 'templates/locations/locations.html'
}).
when('/subInventory/', {
templateUrl: 'templates/subInventory/subInventory.html',
controller: 'SubInventoryController'
}).
when('/detailsInventory/:productId', {
templateUrl: 'templates/detailsInventory/detailsInventory.html',
controller: 'DetailsInventoryController'
}).
otherwise({
redirectTo: '/home'
});
});
'function goBack(){ window.history.back(); } ' これはng-swipe-rightでうまくいくと思いますか? –
これは決して使用されていませんが、正しい履歴がない状態になることができれば混乱する可能性があります –