阅读背景:

如何在其模板中使用View属性?

来源:互联网 
App.FolderListItemView = Ember.View.extend({
        templateName: 'folder-list-item',
        tagName: 'li',
        classNames: ['folder'],
        classNameBindings: ['opened'],
        opened: false,
        click: function (e) {
                this.set('opened', !this.get('opened'));
        }
});



<script type="text/x-handlebars" data-template-name="folder-list-item">
        <i {{bind-attr class="opened:icon-content-plus:icon-content-minus"}}></i>
        ...
</script>
App.FolderListItemView = Ember.View.extend({
  



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: