Route from one page to next page


#1

Hello,
I am developing a simple app which contains just form fields. So i want to take the data from the form input fields from the first page to the next page by the routing concept. I tried. But I can’t. So Kindly somebody help me to solve this problem.

Thanks.


#2

Cache the data in localstorage if you have alot of session data you want to retain.

I would in that case use something like Angular-cache because it really is rather good.

Alternatively you can use

window.location.assign(URL goes here!);

This redirects to a new HTML template but retains the current controller.


#3

Thanks buddy… I am gonna try this…


#4

Easiest way is imo to use Service/Factory to store data and share them between several controllers.

This should help to get you started: http://stackoverflow.com/questions/21919962/angular-share-data-between-controllers

Angular-cache is basically just this on (a lot of) steroids. It seems to be a bit over the top solution for just transferring couple of form field values from one page to another :smile:


#5

Thank you for your help friend…