0

I am facing some issues with navigation back to previous page. What I am trying to do is in a cancel-button click I am calling a function where I am using history.back(); which is working fine. The problem is that the same page is having some validation so when I am clicking the cancel-button it is checking all the fields and then it is navigating back.

I also used history.go(-1) getting same issue. I even tried app.navigate("details/"); which is working fine but it is coming in loop. For example: if I am navigating back to page 2 from page 3 its working but when I am trying to navigate from page 2 to page 1 its coming back to page 3.

Can someone please help me figure this out.

wpercy
  • 9,636
  • 4
  • 33
  • 45
vishal
  • 55
  • 6

2 Answers2

0

Adapted to http://js.devexpress.com/Documentation/Guide/SPA_Framework/Navigation_and_Routing/?version=15_2 you can also navigate back like this:

Application1.app.navigate('View1', { root: true });
// or
Application1.app.navigate('View1', { target: 'current' });

Hope this helps.

M. Schena
  • 2,039
  • 1
  • 21
  • 29
  • I have already tried both the ways the first way is making my previous view as a root page from where I am not able to navigate initial page. and second way also didn't works – vishal Jan 28 '16 at 06:00
0

You can use back method.

Application1.app.back();