如何在离子应用程序中设置起始页
How to set a starting page in an ionic app?
当我在命令提示符下输入"ionic serve"时,我想将Registration.html页面设置为我的起始页面。
这是我的app.js代码,index.html&注册.html
为了达到这个结果,应该做出哪些改变?
app.js:
.config(function($stateProvider, $urlRouterProvider) {
$stateProvider
.state('Registration', {
url: '/Registration',
templateUrl: 'templates/Registration.html'
controller: 'RegistrationController'
})
$urlRouterProvider.otherwise('/Registration');
})
index.html:
<body ng-app="starter">
<ion-pane>
<ion-header-bar class="bar-stable">
<h1 class="title">Demo</h1>
</ion-header-bar>
<ion-content>
</ion-content>
</ion-pane>
Registration.html:
<ion-view view-title="Registration">
<ion-content class="padding">
<h1>Welcome !</h1>
<h1>Please Sign in To Connect</h1>
<div class="list">
<button class="button ion-social-linkedin button-positive button-block" >Connect using LinkedIn</button>
<button class="button ion-social-google button-positive button-block" >Connect using Google</button>
</div>
</ion-content>
</ion-view>
在index.html中,在body标记之间只需放置<ion-nav-view></ion-nav-view>
即可删除其他所有内容。。。
如果您使用状态应用程序,请尝试以下操作:
$urlRouterProvider.otherwise('/app/Registration');
相关文章:
- 按钮不'我不工作;我又回到了起始页
- 如何避免试图用php+jquery显示php起始页的无限循环
- 如何在 PHP 中使用 OnChange 事件的下拉列表中选择一个选项后,对大量数据行设置分页
- 使用jQuery构建可自定义的起始页
- 如何为网页上的链接设置“接受页眉”
- 在设计一个有角度的应用程序时出现了伪起始页
- 如何在离子应用程序中设置起始页
- DataTables在ajax数据加载后手动设置分页
- 如何使用angular js设置标题页
- d3强制可折叠布局-所有节点都折叠的起始页
- 如何在手风琴导航菜单中设置当前页面子链接及其父链接的样式
- 由两部分组成的主页类似于tumblr的起始页
- 设置多页RequireJS时出现问题
- 如何用angularJS实现独立的网站起始页
- AngularJS到多个起始页的路由
- CK编辑器.设置每页最大字数
- 在数据表插件jQuery中设置分页长度
- WinJs:如何以编程方式导航到另一个起始页
- 淡出起始页
- 角度分页,通过控制器设置第一页