Skip to content

Handlebars cannot see the added view helpers #2

@revelfire

Description

@revelfire

The view sample presented isn't working for me.

here's my test:

var User = Backbone.Model.extend();
var HelloView = Backbone.HandlebarsView.extend({
template: 'Hello {{name}}'
})
var AppView = Backbone.HandlebarsView.extend({
template: '

Hello

{{view "HelloView" model=this}}'
});
var app = new AppView({model: new User({name: 'Foli'})});
console.log(app.render().$el.html());

I am using the current version of the plugin, the latest backbone and jquery. I am using requirejs. Here's the entire code dump:

https://gist.github.com/revelfire/5881952

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions