In the Ember.js
app that I'm working on, I'm defining a view in my App.js
file:
RateEditor.DeleteTierView = Em.View.extend({
classNames: ['delete-tier-view'],
tagName: 'button',
click: function () {
var tier = this.get('content');
var controller = this.getPath('contentView.content');
controller.get('content').removeObject(tier);
}
});
The view displays correctly as a button
and the click
function is working fine. But I can't figure out how to set the text of the button
, so it's just blank.
Is there a property that lets you set the text?
To create this:
<button class="ember-view delete-tier-view">Click Me</button>
Do this:
{{#view RateEditor.DeleteTierView}}Click Me{{/view}}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.