emberjs.view 改变样式

http://emberjs.com/api/classes/Ember.View.html



AView = Ember.View.extend({ template: Ember.Handlebars.compile('Hello {{excitedGreeting}}')
});

aController = Ember.Object.create({ firstName: 'Barry', excitedGreeting: function(){ return this.get("content.firstName") + "!!!" }.property()
});

aView = AView.create({ controller: aController,
});
自己定义了一个视图,修改了<span>的样式
App.LabelView=Ember.View.extend({
 template: Ember.Handlebars.compile('<span >I am the template</span>'),
 id:'span1',
     didInsertElement: function () {
 alert($(this).attr('id'));
this.$().addClass("blue");
    },
 willInsertElement: function () {




    },
});

你可能感兴趣的:(emberjs.view 改变样式)