javascript 如何在 Ionic For Hybrid Mobile Application 中添加多个 HTML 页面?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/24129708/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-28 02:14:13  来源:igfitidea点击:

How to add multiple HTML pages in Ionic For Hybrid Mobile Application?

javascripthtmlangularjsionic-framework

提问by user3352615

I have two pages in HTML as sign in and sign up page but unable to make them in single index.html page.

我有两个 HTML 页面作为登录和注册页面,但无法在单个 index.html 页面中创建它们。

My project is Hybrid mobile app development.

我的项目是混合移动应用程序开发。

回答by regmi

You will need to use ionic navigation directives. See the link below to read more on it. Inside the ionic directive lies Angular's Routers.

您将需要使用离子导航指令。请参阅下面的链接以了解更多信息。在 ionic 指令内部是 Angular 的路由器。

http://ionicframework.com/docs/api/directive/ionNavView/

http://ionicframework.com/docs/api/directive/ionNavView/

回答by Mawardy

in ionc2 you can use NavController

在 ionc2 中你可以使用 NavController

https://ionicframework.com/docs/v2/api/navigation/NavController/

https://ionicframework.com/docs/v2/api/navigation/NavController/

for more demonstration check this link: https://www.joshmorony.com/a-simple-guide-to-navigation-in-ionic-2/

如需更多演示,请查看此链接:https: //www.joshmorony.com/a-simple-guide-to-navigation-in-ionic-2/

to generate a new page you can write "ionic g page pageName" using CLI

要生成一个新页面,您可以使用 CLI 编写“ionic g page pageName”