One way to do that is to put the data in a service and inject that service
everywhere you need it. For example,

myModule.factory('myDataSvc', function () {
  var svc = {};
  var favoriteNumber;

  svc.setFavoriteNumber = function (n) { favoriteNumber = n; };
  svc.getFavoriteNumber = function () { return favoriteNumber; };

  return svc;
}

On Wed, Sep 24, 2014 at 11:35 AM, mark goldin <[email protected]> wrote:

> I have UI that is bound to some $scope values. When I go deeper into my
> application I need to use values entered in UI. At some point data that was
> put on $scope by UI is not available. How can I share data collected from
> UI across the app?
>
> Thanks
>
> --
> 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/d/optout.
>



-- 
R. Mark Volkmann
Object Computing, Inc.

-- 
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/d/optout.

Reply via email to