0

I tried to follow this approach

While it does reload, it does not however allow me to stay on my current page. It keeps on going back to the first state of my app.

I am currently using ui-router. Is there another way of reloading the page without going back to the first state? I am currently experiencing an odd flicker when I do this:

$scope.submit = function() {
  $state.go($state.current, {}, {
    reload: true
  });
  doDeposit();
}

and then pass parameters on it (within doDeposit()):

var oResponse = data;
$state.transitionTo('deposit.status', {
  opts: {
    'response': oResponse,
    'amount': data.amount
  }
});

Current behavior: Page reloads; goes back to the home page for a second, then switches back to the intended page. I just need the data to refresh within its page. I have a 'submit again' button that redo the initial behavior of the first 'submit'. It re-processes the data available without going back to its initial state.

Community
  • 1
  • 1
ralphcarlo
  • 209
  • 6
  • 22

2 Answers2

0

Hope this can help you solve your problem. Good luck to you!

Set URL to SEO Friendly Title with Dashes instead of ID

Community
  • 1
  • 1
xuan hung Nguyen
  • 390
  • 3
  • 12
  • Hi. Thanks for the input, but I don't think this helps me solve my current problem. I just need the refreshed state to stay on its current page. – ralphcarlo May 16 '16 at 08:08
0

i'm sorry because first answer i'm copy wrong link. Hope this can help you:

https://ngmilk.rocks/2015/03/09/angularjs-html5-mode-or-pretty-urls-on-apache-using-htaccess/

xuan hung Nguyen
  • 390
  • 3
  • 12
  • Not sure how this helps either. Basically, I have a page that submits parameters initially upon click. It then transitions to the page where it has a 'submit again' button. That button needs to redo what the initial submit has done (first it has to reload its data to process them again), without going back to the home page. – ralphcarlo May 16 '16 at 08:12