ionic中div可以绑定ng-click 吗
答案:1 悬赏:10 手机版
解决时间 2021-03-21 07:28
- 提问者网友:献世佛
- 2021-03-20 17:49
ionic中div可以绑定ng-click 吗
最佳答案
- 五星知识达人网友:长青诗
- 2021-03-20 19:20
ionic中div可以绑定ng-click
写一个类,将你要的参数都封装进去。然后通过IAsyncResult.AsyncState进行传递。
// 1)定义类,封装你要的任何东西
class StateObject
{
public Scoekt frd{get;set;}
pubic ComboBox combo{get;set;}
//可以添加任何你需要的东西
//……
}
// 2)在异步调用前,实例化StateObject
StateObject state = new StateObject();
state.frd = frd;
state.combo = comBox_client;
AsyncCallback callBack = new AsyncCallback(sendCallBack);
frd.socket.BeginSend(msg, 0, msg.Length, SocketFlags.None, callBack, state);
//3)在回调函数中使用StateObject
private void sendCallBack(IAsyncResult ar)
{
StateObject state = (StateObject)ar.AsyncState;
//从 state中 取出frd, combo ……
Socket frd = state.frd;
ComboBox combo = state.combo;
try
{
frd.EndSend(ar);
}
catch (System.Exception ex)
{
combo.Invoke(removeFriend, combo, friends,frd)
}
}
写一个类,将你要的参数都封装进去。然后通过IAsyncResult.AsyncState进行传递。
// 1)定义类,封装你要的任何东西
class StateObject
{
public Scoekt frd{get;set;}
pubic ComboBox combo{get;set;}
//可以添加任何你需要的东西
//……
}
// 2)在异步调用前,实例化StateObject
StateObject state = new StateObject();
state.frd = frd;
state.combo = comBox_client;
AsyncCallback callBack = new AsyncCallback(sendCallBack);
frd.socket.BeginSend(msg, 0, msg.Length, SocketFlags.None, callBack, state);
//3)在回调函数中使用StateObject
private void sendCallBack(IAsyncResult ar)
{
StateObject state = (StateObject)ar.AsyncState;
//从 state中 取出frd, combo ……
Socket frd = state.frd;
ComboBox combo = state.combo;
try
{
frd.EndSend(ar);
}
catch (System.Exception ex)
{
combo.Invoke(removeFriend, combo, friends,frd)
}
}
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯