In a javascript file I have this:
Work.expenses= function (params)
{
function deleteExpenses()
{
//here I want to call the loadExpensesList method
}
}
Work.expensesList= function (params)
{
function loadExpensesList()
{
//this is the method I want to call
}
}
How do I call the loadExpensesList method in the deleteExpenses method? Thank you!
Work.expenses= function (params)
{
function deleteExpenses()
{
Work.expensesList('something')();
}
}
Work.expensesList= function (params)
{
function loadExpensesList()
{
}
return loadExpensesList;
}
You can try like this. But can be better by understanding the requirement.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.