- Must use Sprockets for requiring mustache templates.
- Mustache templates have to be compiled with can.mustache for compatibility with 2.0 and 3.0
- Must expose compiled templates under a namespace, defaults to the commonly used
JST
variable exposed in the main object (window
)
#= require ./panel_component
#= require ./tabs_view_model
#= require templates/tabs_component
#= require templates/tabs_view
# Tabs Widget Component
can.Component.extend
tag: 'tabs'
scope: this.TabsViewModel
template: JST['tabs_component']
Luis Merino is CTO at Proudsugar.com, please refer to the contact email.
that's great, it's a good practice to prefix your custom tag http://canjs.com/docs/can.Component.prototype.tag.html