Quantcast
Channel: JavaScriptMVC Forum
Viewing all articles
Browse latest Browse all 3491

Re : Controllers on parent element are getting destroyed when a child element is removed from the DOM which has controller - this is happening recursively

$
0
0
Also in JMVC, template was added first to the dom and then plugin method was called.

But in canjs - control(helper method similar to plugin) is getting called first and then template is getting added to DOM.

Was this intentional change?

$("#body-container").html(can.view("loginEJS"))

-- loginEJS - Header, Footer controllers are called first and then loginEJS is added #body-container
<%== can.view.render("headerContainerEJS", this) %>
<div><button id="login-button"> Login</button></div>
<%== can.view.render("footerContainerEJS", this) %>

-- headerContainerEJS
<div id="header-container" <%= control("Header", this)%>> </div>








Viewing all articles
Browse latest Browse all 3491

Trending Articles