2013-11-23 32 views
1

我是Marionette和moment.js的新手,因此對於javascript和web編程,請原諒我的問題聽起來很愚蠢。 這是我想要實現的。 我想在我的木偶應用程序中全局使用moment.js,因此我想要做這樣的事情,但我該怎麼做呢?如何在marionette應用程序中包含moment.js?

SuperAppManager.module('AppointmentsApp.List', function (List, SuperAppManager, Backbone, Marionette, $, _, moment) { 
var date = moment(); 

} 

問候, 赤膽

回答

1

試試這個,根據Custom Arguments從木偶文檔:

SuperAppManager.module('AppointmentsApp.List', function (List, SuperAppManager, Backbone, Marionette, $, _, moment) { 

var date = moment(); 

}, moment); 
+0

真棒,謝謝。這樣簡單的解決方案工作得很好 –

相關問題