我想将视图js中的数据传递给主js。主js是主容器,其中包含视图,请让我知道如何使用我的淘汰赛和durandal。
主要容器
static void Main(string[] args)
{
var timer = new System.Timers.Timer(60000);
timer.Elapsed += new
System.Timers.ElapsedEventHandler(CheckEndProcessStatus);
//if timer timed out, stop executing the function
}
private void CheckEndProcessStatus(object source, ElapsedEventArgs args)
{
try
{
if (CheckFunction())
{
//stop timer
}
}
catch(Exception ex)
{
throw;
}
}
private bool CheckFunction()
{
bool check = false;
try
{
//some logic to set 'check' to true or false
}
catch (Exception ex)
{
throw;
}
return check;
}
js file
init?(hostname: String)
// example
Reachability(hostname: "www.mydomain.com")
查看js文件
{{1}}