very different...
【 在 fen (农) 的大作中提到: 】
: define(["purchase"],function(purchase){
: purchase.purchaseProduct();
: });
this module exports undefined, and executes purchase.purchaseProduct()
while it is being loaded
: 和
: define(["purchase"],function(purchase){
: return function(){
: purchase.purchaseProduct();
: }
: });
this module exports a function, which would execute purchase.purchaseProduct()
when called
: 这两种define的方式有区别吗?
--
FROM 202.120.55.*