Hi
In my current app we are going after a model of nested components, these components are nested on the server side and all the html provided already built to the client. For example you might have a 'tabs' component which has two nested components inside each tab.
Each component should be reusable so it has to contains its own Javascript and initialise itself.
I am having trouble trying to model something like this with CanJS. Please see this fiddle
I might look weird having all those nested scripts, but think server side includes. Each include has its own Javascript and template tags.
The problem I am having is that the browser is trying to run the javascript inside the mustache template before it is added to the DOM, or so I think.
Any clues, suggestions will be great.
Thanks.