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

Steal, Components and Templates

$
0
0
How does one do the following where the template being stolen (temp) contains a "my-thing" tag.

When the control declared below is instantiated, the my-thing tag is not converted to a component and <my-thing></my-thing> is rendered instead.

Do the component need to be declared before steal'ing the template?

  1. steal("myapp/views/template.mustache", function(temp) {
    can.Component.extend({
    tag: "my-thing",
    template: "hello count"
    });

    return can.Control.extend({
    init: function() {
    this.element.append(temp());
    }
    })
    })



asdf

Viewing all articles
Browse latest Browse all 3491

Trending Articles