Redirect to route in F7

Hi all,

I have an issue
I standing outside and I call a route in Framework7 . But it can’t load page after return View.

Please let me know your solution.

Thank for support

Please show what you have tried and where with code examples

this is code
in file routes.js

  {
     path: '/thanh-toan/ket-qua-thanh-toan',
     componentUrl: './thanh-toan/ket-qua-thanh-toan',
     on: {
         pageInit: function (event, page) {

         }
  },

and in controller

  [Route("thanh-toan/ket-qua-thanh-toan")]
  public ActionResult VnPayReturn()
  {
  .....
  return View();
  } 

in file VnPayReturn.cshtml

 @{
     ViewBag.Title = "Giao dịch thành công";
     Layout = "~/Views/Layout/_Layout_ITN.cshtml";
 }
<template>
     <div class="page">
         <div class="nav-c">
             <table>
                 <tr>
                     <td class="left">
                         <a href="#" class="link nav-c__button nav-c__button--back back"></a>
                     </td>
                     <td class="center">
                         <div class="nav-c__Text">
                             Giao dịch thành công
                         </div>
                     </td>
                     <td class="right">
                         <a href="tel:1900555520" class="external link nav-c__button nav-c__button--call"></a>
                     </td>
                 </tr>
             </table>
         </div>
         <div class="page-content">
             <div class="content__wrap content__wrap--1">
                 <div class="box-c">
                     <div class="box-c__header">Thông tin đặt vé</div>
                     <div class="box-c__content">
                         <div class="box-c__item">
                             <table>
                                 <tr>
                                     <td class="clrgrey">Mã vé</td>
                                     <td class="right">VN/SLSDBG</td>
                                 </tr>
                             </table>
                         </div>
                         <div class="box-c__item">
                             <table>
                                 <tr>
                                     <td class="clrgrey">Thời gian thanh toán</td>
                                     <td class="right">12:32 11/12/2017</td>
                                 </tr>
                             </table>
                         </div>
                         <div class="box-c__textinfo">
                             Vui lòng kiểm tra Thư điện tử/ Số điện thoại để xem chi tiết đặt vé. Thông tin nhận vé
                         </div>
                         <div class="box-c__item">
                             <table>
                                 <tr>
                                     <td class="clrgrey">Họ tên</td>
                                     <td class="right">Le Nguyen Ngoc</td>
                                 </tr>
                             </table>
                         </div>
                         <div class="box-c__item">
                             <table>
                                 <tr>
                                     <td class="clrgrey">Thư điện tử</td>
                                     <td class="right">[email protected]</td>
                                 </tr>
                             </table>
                         </div>
                         <div class="box-c__item">
                             <table>
                                 <tr>
                                     <td class="clrgrey">Số điện thoại</td>
                                     <td class="right">0979444682</td>
                                 </tr>
                             </table>
                         </div>
                     </div>
                 </div>
                 <a href="/" class="link button-c">Quay về trang chủ</a>
                 <a href="/6-1-xuat-hoa-don/" class="link link-white center">Gửi yêu cầu xuất hóa đơn</a>
             </div>
         </div>
     </div>
</template>

I called address is _http://localhost:22812/thanh-toan/ket-qua-thanh-toan
I set break-point at point return View(); and I saw it passed. But page can’t load (page is white)
Can you help me load this page?

Thanks

Did you enable pushstate?

Yes, I enabled pushstate. I called url as below
http://localhost:22812/thanh-toan/ket-qua-thanh-toan?vnp_Amount=269000000&vnp_BankCode=NCB&vnp_BankTranNo=20180330155735&vnp_CardType=ATM&vnp_OrderInfo=Thanh+toan+Ve+may+bay+cho+ma+dat+cho%3A+VJ%2F0586DE&vnp_PayDate=20180330155715&vnp_ResponseCode=00&vnp_TmnCode=TPBTK001&vnp_TransactionNo=13082426&vnp_TxnRef=103506&vnp_SecureHashType=MD5&vnp_SecureHash=7a48972ecffa3a7176502051df39d274

Then it is hard to say. Do you have live link with app hosted somewhere so it is possible to check?

If I disable pushstate and call url as below

http://localhost:22812/#!/thanh-toan/ket-qua-thanh-toan?vnp_Amount=198000000&vnp_BankCode=NCB&vnp_BankTranNo=20180406150546&vnp_CardType=ATM&vnp_OrderInfo=Thanh+toan+Ve+may+bay+cho+ma+dat+cho%3A+VN%2F05897B&vnp_PayDate=20180406150255&vnp_ResponseCode=00&vnp_TmnCode=TPBTK001&vnp_TransactionNo=13083463&vnp_TxnRef=103648&vnp_SecureHashType=MD5&vnp_SecureHash=5f4b075d2b4bfd0cc9da43b0eb5472b8

It will return to home page . How can you call controller in this way?

Can you show your View’s parameters where did you enabled pushState and pushStateRoot?

Here is code declare pushState and pushStateRoot

// Dom7
var $$ = Dom7;

// Theme
var theme = ‘md’;
if (document.location.search.indexOf(‘theme=’) >= 0) {
theme = document.location.search.split(‘theme=’)[1].split(’&’)[0];
}

var url = window.location.href + ‘’;
// Init App
var app = new Framework7({
id: ‘io.framework7.testapp’,
root: ‘#app’,
theme: ‘md’,
version: ‘1.0.0’,
view: {
pushState: true, **
** pushStateRoot: window.location.href

},

},

If I enable pushState , and pushStateRoot , when payment gate call to url as above, It will return this view .
If I delete pushState, pushStateRoot , and also call url as above It will return view home.

In case remove pushState and pushStateRoot , Can you call url as above and return view?

No, in this case you will need to parse url manually and load the page using router API

Can you describe detail help me ?

Thanks,

Could you give a detail steps to describe that how to enable the redirect by url?

The framework7-cli default app is not enable the url redirect.