Saving data from one page to another

29 views
Skip to first unread message

Yonatan Kra

unread,
Jan 31, 2014, 6:39:28 AM1/31/14
to ang...@googlegroups.com
Hi,
In my app, I need to keep one page active all the time (for instance - the "incoming emails" page, which is updated all the time and I need to keep track when new emails come in, keep new emails in bold, old emails normal etc.).
Data coming in from the server is just new emails coming in - I don't get anything else from the server (can't ask "backward" data, or state of user) except on first page load when all the emails come in from the server at the same time.
With "simple jqeury", I'd just use the "hide"/"show" and play with them to keep this view on at all time, and just show it with the right route request (i.e. #/inbox).
Is there a more "angular" way to do this?
Thanks

Bernhard Rode

unread,
Jan 31, 2014, 6:50:37 AM1/31/14
to ang...@googlegroups.com
Have you had a look at Angular services? You may bind on to your Apps root. 


2014-01-31 Yonatan Kra <kra.y...@gmail.com>:

--
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 angular+u...@googlegroups.com.
To post to this group, send email to ang...@googlegroups.com.
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/groups/opt_out.



--

Bernhard Rode
M.Sc. (Master of Computer Science and Media)

fon +49.171.5629409
mail ma...@bernhardrode.de
twitter @ebbo

google+ google.com/+BernhardRode
twitter twitter.com/ebbo
facebook facebook.com/bernhard.rode

Yonatan Kra

unread,
Jan 31, 2014, 7:06:52 AM1/31/14
to ang...@googlegroups.com
I've just read it briefly in the docs. Would that be the place where I can keep globals/constants and the likes?
Thanks


--
You received this message because you are subscribed to a topic in the Google Groups "AngularJS" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/angular/2UYv3WdpSYk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to angular+u...@googlegroups.com.

Bernhard Rode

unread,
Jan 31, 2014, 7:11:00 AM1/31/14
to ang...@googlegroups.com
From the docs: "Angular services are singletons objects or functions that carry out specific tasks common to web apps."

So yes =)


2014-01-31 Yonatan Kra <kra.y...@gmail.com>:

Yonatan Kra

unread,
Jan 31, 2014, 7:12:26 AM1/31/14
to ang...@googlegroups.com
Thanks a lot :)
Reply all
Reply to author
Forward
0 new messages