|
1.app.js路由页面
- .state('login', {
- url: '/login',
- templateUrl: "templates/login.html",
- controller: 'LoginCtrl'
- })
复制代码
2.模板页面 最上面加个返回按钮,这样的话从任何地方过来都可以返回回去
- <ion-view title="登录">
- <ion-nav-buttons side="left">
- <!-- <button class="button-icon ion-arrow-left-c" ng-click="backView()"></button>-->
- <button class="button back-button buttons button-icon ion-arrow-left-c header-item" ng-click="$ionicGoBack()">
- <span class="back-text" style="-webkit-transform: translate3d(0px, 0px, 0px);">
- <span class="default-title hide">Back</span>
- </span>
- </button>
- </ion-nav-buttons>
- <ion-content>
- <!-- Logo -->
- <div class="padding text-center">
- <h1>
- <i class="positive ion-ios-camera camera-font"></i>
- </h1>
- <h4 class="positive">照一照</h4>
- <p class="positive">Photo detection health</p>
- </div>
- <!-- Login form -->
- <div class="list list-inset">
- <label class="item item-input">
- <span class="input-label">手机号:</span>
- <input type="tel" placeholder="手机号" ng-model="user.username">
- </label>
- <label class="item item-input">
- <span class="input-label">密 码:</span>
- <input type="password" placeholder="密码" ng-model="user.password">
- </label>
- </div>
- <div class="padding">
- <button class="button button-block button-positive" ng-click="signIn()">
- 登录
- </button>
- </div>
- <!-- Other links -->
- <div class="padding row">
- <div class="col align_right">
- <span class="dark">忘记密码?</span>
- </div>
- <div class="col align_left">
- <a href="#/register" class="dark">注册</a>
- </div>
- </div>
- </ion-content>
- </ion-view>
复制代码
|
|