What's the difference between Handlebars helpers and Ember Handlebars helpers?

后端 未结 2 599
面向向阳花
面向向阳花 2021-01-02 07:01

I can\'t catch up with all those changes done to plain Handlebars and modified Ember Handlebars helpers. If I remember correctly you can register a helper with the following

2条回答
  •  伪装坚强ぢ
    2021-01-02 07:37

    • Ember.Handlebars.helper should be used by to register helpers, other methods are just limited versions of it. Ember.Handlebars.helper renders HTML with bindings that keep views and models in sync. Functions, Views and Components can be supplied as helper definitions.

    • Ember.Handlebars.registerBoundHelper is just like Ember.Handlebars.helper, but you can supply only a Function as a helper definition.

    • Ember.Handlebars.registerHelper previously delegated to Handlebars.registerHelper. Ember.Handlebars.registerHelper no longer exists, but Handlebars.registerHelper is still used internally by Ember to create all the helpers after the bindings are set up.

提交回复
热议问题