I am brand new to the world of Ionic and AngularJS. I have just started working on a simple project but have hit a roadblock.
My goal is,
To create a login page and a register page. When a user clicks the register button on the login page, they should be directed to the register page.
Below is my login page:
<body ng-app="starter"
class="platform-android platform-cordova platform-webview">
<ion-header-bar align-title="center" class="bar-positive">
<h1 class="title">Log In</h1>
</ion-header-bar>
<ion-content> Some content! </ion-content>
<ion-footer-bar align-title="center" class="bar-positive right">
<div class="button-bar">
<a class="button button-clear" href="#/register">Register</a>
</div>
</ion-footer-bar>
</body>
And here is my app.js file:
angular.module('starter', ['ionic'])
.run(function($ionicPlatform) {
$ionicPlatform.ready(function() {
});
})
.config(function($stateProvider, $urlRouterProvider) {
$stateProvider
.state('user.register', {
url: '/register',
views: {
'page-register': {
templateUrl: 'templates/register.html'
}
}
})
});
I have a register.html page in the templates folder.
Project Structure shown below..
Please help me tackle this navigation problem.
Thank you !
Ajoy