InternalFX
InternalFX

Reputation: 143

What is the purpose of {{render}} and {{control}} in ember pre4

There seems to be zero documentation for these handlebars helpers. Can someone explain what they do and how best to use them?

Upvotes: 1

Views: 117

Answers (1)

ulisesrmzroche
ulisesrmzroche

Reputation: 145

{{render}} uses the same named controller and template in the current context. If a view class with the same name exists, it uses that view class. If a model is specified, it becomes the model for that controller. Default target will be that same controller.

{{control}} uses a new instance of the named controller, instead of a singleton of the named controller.

{{partial}} dumps the same template into place, with the same container, and the current controller. The template name must start with an underscore.

Upvotes: 1

Related Questions