[v2] Link back goind to index


#1

Hi There,

I’m not able to navigate properly between pages, See below scenario:

index - page1 - page 2

In Page 2, if I click in the link back, it goes to index instead to page1. What I’m doing wrong?

Thanks

var app = new Framework7({
  id: 'com.fergur.app',
  root: '#app',
  cache: true,
  theme: theme,
  //stackPages: true,
  statusbarOverlay: true,
  data: function () {
  },
  methods: {
  },
  routes: routes,
  dialog: {
    title: ' ',
	buttonOk: "OK",
	buttonCancel: "NO",
  },
  notification: {
    title: 'Fergur',
    closeTimeout: 2000,
  },
  on: {
    init: function () {
        //console.log('App initialized');
        createLogin();
		//partes_calendario();
		//request();
    },
    pageInit: function () {
        //console.log('Page initialized');
    },
  },
  view: {
        pushState: false
    }  
  
});

#2

Can you edit and wrap your code in this quotes?

---> ```
**your code here**
 ``` <---

It will make your post a lot easy to read.

this:

var app = new Framework7({
** root: ‘#app’,**
** theme: ‘auto’**
});

var viewMain = app.views.create(’.view-main’);

will change to this:

var app = new Framework7({
  root: '#app',
  theme: 'auto'
});

var viewMain = app.views.create('.view-main');

see much nicer, easy to read.


#3

@Gen123 and what is in your routes? And the full code of your page2 would be also good to see

@pvtallulah i made you moderator :wink:


#4

Hi pvtallulah,

Thanks for that. I will post the code in the way that you suggested.


#5

Hi nolimits4web,

routers file is the default one.

—>
var routes = [
// Index page
{
path: ‘/’,
url: ‘./index.php’,
name: ‘home’,
},
// About page
{
path: ‘/about/’,
url: ‘./pages/about.html’,
name: ‘about’,
},
// Right Panel pages
{

—>
{
path: ‘/ver-parte/’,
url: ‘./pages/ver-parte.html’,
},
<—

See below the page 2 first lines

<div class="page" data-name="ver-parte-readonly">
  <div class="navbar">
    <div class="navbar-inner sliding">
	<div class="right">
	   <div class="image-upload">
	 	<label for="file-input" id="attach2">
		</label>
		<input id="file-input" onchange="pressed()" name="file-input[]" type="file" enctype="multipart/form-data" style= "display:none "class="inputfile inputfile-4" data-multiple-caption="{count} files selected" multiple />
		</div>
			<a class="" href="#">
			 <i class="f7-icons material-icons md-only" style="margin-right: 20px" id="edit_parte"">compose</i>
			</a>
		</div>
      <div class="left">
        <a href="#" class="link back">
          <i class="icon icon-back"></i>
          <span class="ios-only">Back</span>
        </a>
      </div>

—>

Thanks!


#6

gen 123 please use syntax coloring as decribed in this page

Vladimir, we should have same page like this in this forum too