我正在尝试创建具有正在扩展中的视图中描述的功能的视图,但具有不同的类名。发生的事情是 ExpTypesView 类是 ['nav','nav-pills']和['nav','nav-tabs']。如何设置它以便它们替换NavView 中设置的类名?
Resume.NavView = Em.View.extend({
tagName: 'ul',
classNames: ['nav','nav-tabs'],
currentPathDidChange: function(){
Ember.run.next( this, function() {
$("ul li:has(>a.active)").addClass('active');
$("ul li:not(:has(>a.active))").removeClass('active');
});
}.observes('controller.currentPath')
});
Resume.ExpTypesView = Resume.NavView.extend({
classNames:['nav','nav-pills']
});