How does polymer react to internal content -


i experimenting polymer see if can build mobile version of application have developed in php/mootools

what want achieve single page application, when starts puts single image splash screen, whilst in background validates user logged in member of smf forum. if fails validate, redirect login url. thinking body of index.html page contain this

<body>     <forum-auth forumurl="/forum/authorize.php" login_url="/login" splash="background.png">        ... lots of content further polymer elements access global variables       {{token}} , {{user}} gets returned successful logon. token jwt , user object application specific.      </forum-auth> 

the polymer element definition go this

  <template>       <div id="splash" class="show-splash-screen">            <img src="{{splash}} />       </div>       <core-ajax url="{{forumurl}} handleas="json" on-core-response={{handleresponse}}></core-ajax>       <template if="{{token}}">               <content></content>       </template>    </template> 

and script tie together, haven't figured out yet. include assignment of ajax response this.token , this.user , remove show-splash-screen class div splash element.

my question - correct way architect requirement -should invest time build token way. ask, because not sure reference "light dom" means in documentation , whether embedding meat of application content element right thing do.

or there better way achieve same sort of thing. perhaps not including content, or flash image or login-url, , firing 1 of 2 events when authorization fails or completes (something nervous of not declarative).


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -