0
我有一个Ionic项目。在我的主页上,我想链接到另一个内部视图(页面)。特别是当用户点击图片时,我希望它导航到pray.html页面。Ionic Cordova链接到内部视图(页面)
这里是我的代码:
<div style="margin-left: -10px; width: calc(100% + 20px);">
<a style="display:block;" href="#PrayPage">
<img src="../assets/img/praycomplinebutton.png" style="display: block; width: 100%; margin-left: auto; margin-right: auto;">
</a>
</div>
目前,当我尝试这一点,我得到以下错误:
Runtime Error:
Uncaught (in promise): invalid views to insert
Stack:
[email protected]://localhost:8100/build/polyfills.js:3:13199
http://localhost:8100/build/polyfills.js:3:12547
[email protected]://localhost:8100/build/main.js:43691:22
[email protected]://localhost:8100/build/main.js:43679:24
[email protected]://localhost:8100/build/main.js:4480:43
[email protected]://localhost:8100/build/polyfills.js:3:4146
http://localhost:8100/build/polyfills.js:3:13734
[email protected]://localhost:8100/build/main.js:4471:47
[email protected]://localhost:8100/build/polyfills.js:3:4841
[email protected]://localhost:8100/build/polyfills.js:3:1898
[email protected]://localhost:8100/build/polyfills.js:3:10674
我知道这是可以做到。我只是找不到任何文件关于如何去做。我会很感激你可以提供的任何指导。
https://forum.ionicframework.com/t/how-a-button-open-another-page/42645/11 – Edison
假设你正在使用ionic3。您可以通过离子导航教程来了解页面链接。 http://blog.ionic.io/10-minutes-with-ionic-2-adding-pages-and-navigation/ –
谢谢@MayankKumar。这工作。 – Brent