mirror of
https://github.com/flarum/core.git
synced 2025-07-29 04:30:56 +02:00
Use component prototypes instead of instances
This means the component instance is created in the template, meaning properties can be overridden in the view helper. It also just makes more sense - a view instance doesn’t need to exist until it is rendered in the template.
This commit is contained in:
@@ -12,7 +12,7 @@ export default ComposerBody.extend({
|
||||
submitLabel: 'Post Reply',
|
||||
|
||||
populateControls: function(items) {
|
||||
var title = Ember.Component.create({
|
||||
var title = Ember.Component.extend({
|
||||
tagName: 'h3',
|
||||
layout: precompileTemplate('Replying to <em>{{component.discussion.title}}</em>'),
|
||||
component: this
|
||||
|
Reference in New Issue
Block a user