You've created in both controllers copies of a simple type - the trick
boils down to have in both places references to the very same object. Like
here:
http://jsfiddle.net/YNHYJ/5/


2014/1/25 Michał Popielnicki <[email protected]>

> Hello Angular Community,
>
> I've just started learning Angular and I've stumbled upon a obstacle that
> I can't wrap my head around. Please have a look at my very basic example
> here:
>
> http://jsfiddle.net/YNHYJ/1/
>
> I have a two text inputs that should share data between MenuCtrl and
> FooterCtrl via SharedData service. When the app loads both fields get
> populated with the default value of SharedData.query then when I change
> value in one or the other input it does not get updated inside the other
> controller.
>
> I would appreciate any clue regarding what am I doing wrong. Thank you
> very much.
>
> My best
>
> --
> 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 http://groups.google.com/group/angular.
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
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 http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to