私の基準を満たすオブジェクトを返すという単純な機能があります。lodash _.find all matches
コードは次のようになります。
var res = _.find($state.get(), function(i) {
var match = i.name.match(re);
return match &&
(!i.restrict || i.restrict($rootScope.user));
});
は、どのように私は、この基準が、すべての結果を満たしているすべての結果(ちょうど最初ではない)を見つけることができます。
anzアドバイスありがとうございます。
'_.filter'をお探しですか? – georg