use*_*500 3 android ios ionic-framework ionic2
我想从离子2应用程序打开默认的电子邮件客户端.
我读到使用url方案'mailto:'应该可行.但由于某些原因,在我的应用程序中它只适用于Android,但不适用于iOS.
mailto(email) {
this._platform.ready().then(() => {
open('mailto:'+email, "_system");
});
}
Run Code Online (Sandbox Code Playgroud)
调用该函数时不会引发任何错误,但是如果我使用httpURL,则默认浏览器会在两个平台上按预期打开.
你可以这样做:
mailto(email) {
this._platform.ready().then(() => {
window.open('mailto:'+email);
});
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
5676 次 |
| 最近记录: |