Hi,

The way to pass information between controllers (wether it's a single page 
application or multi page application) is via service.
You create a service with your variable inputs. In controller A you 
Dependency Inject your service and then set your inputs from the controller.
Then in Controller B you once again inject your controller and read those 
inputs.

Another, alternative way, is to use either session storage or local storage 
(we use the latter in our SPA, but it's needed if they want to open 
multiple tabs etc)
and we have no problems doing it this.

Hope this helps.
Let us know if you need any more information :)

Regards
Anthoni

On Thursday, 14 April 2016 14:36:51 UTC+1, Ihsen Ben Salah wrote:
>
> Hi, 
>
> Thank you for your answer.
> My problem is actually the fact that i have different controllers for 
> different pages.I can't really see how it would be possible to transfer 
> data between difefrent controllers.
> I guess the solution you mentioned works with 'one page' application.
>
>
> Le jeudi 14 avril 2016 14:42:18 UTC+2, Ihsen Ben Salah a écrit :
>>
>> I want to store form data that a user inputs before loading another page.
>>
>> I need to save data already entered by the user. The default behaviour of 
>> browsers is to save it but the issue is the "ng-model" that binds it to 
>> find the model empty since the scope changed.
>>
>> Is there any other way to make that possible without having to define a 
>> service ?
>>
>
>
> Ihsen BEN SALAH 
>

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to