require ステートメント内にいるときにテスト変数が必要だとします。必要な変数にアクセスするための最善の方法はどれですか? コンテキストを変更する方法はありますか?
somefunction: function(id) {
var test ="xxx";
require(['models/Model', 'views/View'], function(ArticleModel, ArticleView) {
var collection = new Collection();
// I need to access the TEST variable HERE
});
}