Displaying welcome "user" on landing page after login

278 views
Skip to first unread message

jaydat...@gmail.com

unread,
Oct 31, 2014, 6:23:27 AM10/31/14
to polym...@googlegroups.com
Hi Guys,

Here I am using polymer with my project, and I have a login page and a landing page. so, if user is able to login sucessfully than he/she is thrown to the landing page, 

Now, here on landing page I want to display some thing like: welcome 'username', e.g. welcome Jaydatt or welcome Mark. So, this username I am putting into session so that I can use it through out my application.
I am using Node.js express with polymer.

So, my question here that how can I do that. I know about this <temlate> tag with polymer where using {{userame}} I can bind the data. But what if I want to take this username for session and display on html page.
If through any rendering engine than which?

In brief: my question is I want to display welcome username  on the landing page.... so how can I do that using polymer and Node.js approach....?

Eric Bidelman

unread,
Oct 31, 2014, 2:33:34 PM10/31/14
to jaydat...@gmail.com, polymer-dev
Can your server output set that variable either as an attribute on your element
or in js. For example, this GAE app fills js properties, server-side:


Follow Polymer on Google+: plus.google.com/107187849809354688692
---
You received this message because you are subscribed to the Google Groups "Polymer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to polymer-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/polymer-dev/1df78ea4-2a45-4563-8619-84a7a423087a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

santiago esteva

unread,
Nov 1, 2014, 10:19:44 AM11/1/14
to polym...@googlegroups.com, jaydat...@gmail.com
Another option would be to add it as a parameter to the first route dispatched.
As long as there is not sensitive information your url is sometimes a decent place to hold state. 
Just make sure the data is not sensitive and dont abuse or you ll go from a semantic bookmarkable url to a bad dark place.
Hope it helps!
Reply all
Reply to author
Forward
0 new messages