Skip to content
This repository has been archived by the owner on Mar 20, 2021. It is now read-only.

HelperView in {{layout-element}} error #275

Closed
ghost opened this issue Nov 20, 2013 · 1 comment
Closed

HelperView in {{layout-element}} error #275

ghost opened this issue Nov 20, 2013 · 1 comment

Comments

@ghost
Copy link

ghost commented Nov 20, 2013

Handlebars.registerViewHelper( 'some-helper', function( helperView ) {
console.log( helperView );
} );

var view = new Thorax.LayoutView( {
template: Handlebars.compile( '{{#some-helper}} {{layout-element}} {{/some-helper}}' )
} );

view.appendTo( document.body );

... result...

Uncaught Error: Error "layout-element-helper". For more information visit http://thoraxjs.org/error-codes.html#layout-element-helper

help please...

@eastridge
Copy link
Contributor

@yangpro in this case your some-helper is creating a view, so layout-element is no longer part of the LayoutView, it's part of a child of the LayoutView. You probably want to use plain old registerHelper in this case.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

1 participant