Am a newbie to ionic and and am trying to create a login page with signup and forgot reset options. This is what i have done so far and am stuck, anyone to help will be very appreciated.
<body ng-app="starter" style="background-color: #003366 ">
<ion-pane class="branding">
<ion-content ng-controller="loginCtrl">
<div class="login-image">
<img src="../img/img3.jpg" width="100%" class="padding">
</div>
<div class="padding">
<form name="login-form" ng-submit="doLogin()" >
<div class="list">
<label class="item item-input">
<span class="input-label"></span>
<input type="text" ng-model="loginData.username" placeholder="Username">
</label><br>
<label class="item item-input">
<span class="input-label"></span>
<input type="password" ng-model="loginData.password" placeholder="Password">
</label><br>
<div style=" text-align: right;">
<a href="/forgot-password"> Forgot Password ? </a>
</div><br>
<div>
<button class="button button-block button-positive" type="submit" href = "template/dashboard.html">Log in</button>
</div>
<br>
</div>
</form>
</div>
</ion-content>
</ion-pane>
</body>
i also tried to put the codes in a new file but it doesn’t work, here’s what i mean
index.html
<body ng-app="starter">
<ion-nav-view></ion-nav-view>
</body>
LOGIN.HTML
<ion-view>
<ion-content ng-controller="loginCtrl">
<div class="padding">
<form ng-submit="doLogin()" >
<div class="list">
<label class="item item-input">
<span class="input-label"></span>
<input type="text" ng-model="loginData.username" placeholder="Username">
</label><br>
<label class="item item-input">
<span class="input-label"></span>
<input type="password" ng-model="loginData.password" placeholder="Password">
</label><br>
<div style=" text-align: right;">
<a href="#/"> Forgot Password </a>
</div><br>
<label>
<button class="button button-block button-positive" type="submit" >Sign In </button>
</label>
<br>
<div style=" text-align: center;">
<a href="#/template/createaccount.html">Create Account</a>
</div>
</div>
</form>
</div>
</ion-content>
</ion-view>
app,js
.config(function($stateProvider, $urlRouterProvider) {
$stateProvider
.state('app', {
url: '/app',
abstract: true,
templateUrl: 'templates/tabs.html'
controller: 'loginCtrl',
}
})
.state('login', {
url: '/login',
templateUrl: 'templates/login.html',
controller: 'loginCtrl',
cache: false
})
// if none of the above states are matched, use this as the fallback
$urlRouterProvider.otherwise('/login.html')
});
This one give a blank page .
would be happy if someone helps me out.
Thanks.