Is there a way to pass an array to currentWhen in EmberJS?
问题 I'm trying to make a link stay 'active' on multiple routes, such as /#/users and /#/user. Any ideas? 回答1: You can reopen Ember's LinkView and do something like this (allows currentWhen to contain space delimited values) Ember.LinkView.reopen({ active: function() { // we allow link-to's currentWhen to specify multiple routes // so we need to check each one of them var loadedParams = Ember.get(this, 'loadedParams'); var currentWhen = this['current-when'] || this.currentWhen; currentWhen =