Stephan Schmidt posted on our blog the following comment:
Looks very good. One issue I see is reuse of components. For example
you might want a login box on every page, which changes state when
being logged in.
Can solve Pure this requirement withouth cut&paste the box into every
page?
Peace
-stephan
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
@Stephan, #12
As a login screen is a fairly static HTML you can apply the following
procedure:
* Place the HTML for the login screen in a page while you develop
* Set the directives to make it live
* Then compile it to a JS function (with $p.compile)
* collect this JS function, (with $p.getRuntime; See a "how to" at the
bottom of the page:
http://www.beebole.com/pure/examples/docs/allExamples.html)
* copy&paste the JS functions into a file(.js) that is common to all
your pages (probably with your login logic too)
* Then call this JS function when needed. Note the browser will cache
this JS file