AMD 模块 Javascript:模块加载器错误
AMD Module Javascript: Module Loader Error
我创建了这个模块:
define(function(){
function isEmpty(stValue)
{
return false;
}
function inArray(stValue, arr)
{
return false;
}
return
{
isEmpty : isEmpty,
inArray : inArray //Error here
};
});
但我遇到了一个错误:inArray 行上的模块加载器错误:inArray。我的模块正确吗?
您正在自动插入分号。您实际上是在返回 undefined。
define(function(){
function isEmpty(stValue)
{
return false;
}
function inArray(stValue, arr)
{
return false;
}
return { // correct here
isEmpty : isEmpty,
inArray : inArray //Error here
};
});
我创建了这个模块:
define(function(){
function isEmpty(stValue)
{
return false;
}
function inArray(stValue, arr)
{
return false;
}
return
{
isEmpty : isEmpty,
inArray : inArray //Error here
};
});
但我遇到了一个错误:inArray 行上的模块加载器错误:inArray。我的模块正确吗?
您正在自动插入分号。您实际上是在返回 undefined。
define(function(){
function isEmpty(stValue)
{
return false;
}
function inArray(stValue, arr)
{
return false;
}
return { // correct here
isEmpty : isEmpty,
inArray : inArray //Error here
};
});