Message from JavaScript discussions

November 2016

— That code, you can see constructs the structure of the objects, then if you look here you can see the event listener is set in the factory

Message permanent page


So if I want to make a new ControllerView paired to the LoginPage store, I do this

controllerViewFactory("LoginPage", [viewFactory(false, procedures.renderLoginPage)])

— The DOM will always contain a div called template-container, which, unless otherwise specified, is overwritten entirely by jQuery-Template

Message permanent page

— Ah

— How about having a parent store

— To have the template-container state

— So if you want to show view A, or view B

— You tell parentStore that you want to change the view

— And the parent store itself can diff only which view you want to render (A or B)

— And add the force render flag when necessary

— Hmm, interesting, I will think about this one

— And a copy of the DOM is inside that?