【发布时间】:2017-12-19 07:30:40
【问题描述】:
我正在使用 typescript 开发混合应用程序,我想知道如何访问 typescript 中的函数。
这是我的源代码:
export class SuccessPage {
public removeRoom(){
console.log("removeroom");
}
}
function getRoom(){
var searchList = '';
....
searchList += ' <li id=\'' + result.Item[0].room_num + '\'>';
searchList += result.Item[i].dest_x + ', ' + result.Item[0].dest_y +
'<br><button class="removeRoom" onclick="removeRoom()"> </button></li>';
....
}
我打算访问removeRoom 函数。我怎样才能做到这一点?
【问题讨论】:
标签: angular function typescript ionic2