Thanks Alex.
Is this the Bitovi recommended way?
And while my method seems weird, is it the unaccepted way?
I just thought it would be nice (and easy) to say "insert one of these content panel components and fill it with this content (another component).
Actually got my experiment to work last night.
- steal('can','myapp/components/content_panel/views/content_panel.mustache','myapp/helpers/mustache_helpers.js', function(can, contentPanelTmpl) {return function(scope) {can.view.registerView('contentTmpl', scope.contentTag);can.Component.extend({tag: 'content-panel',template: contentPanelTmpl,scope: scope});};})
- <div class="widget small coolInset"><div id="panelHeader" class="head"><h5 class="{{iconClass}}">{{l10n appTitle}}</h5></div><div class="body"><div id="panelContent" class="panel">{{>contentTmpl}}</div></div></div>
- ContentPanel({appTitle: 'appTitle',iconClass: 'iSettings',contentTag: "<shares-settings></shares-settings>"});
I don't know. It seems like a neat way to package reusable components.