Not Able to open the page while on Button from index.html

hi I am new to this ionic dev I am trying to open the new page on button click.but when I put the alert() it will prompted.


           <div ng-controller="loginCtrl">
            <Button id="btnLogin" class="icon icon-right ion-log-in left button button-positive button-block   " style="border-radius:15px 15px 15px 15px;" ng-click="login('/login')">Login</Button>


var app =angular.module(‘app’,[‘ngRoute’]);
.state(‘login’, {
url: ‘/page2’,
templateUrl: ‘templates/login.html’,
controller: ‘loginCtrl’


var app =angular.module(‘app’, []);
app.controller(‘loginCtrl’, function ($scope, $http,$stateprovider) {
$scope.login = function (path) {

Here I want to open the login.html page while clicking the Login button, but when I click it prompt the alert but I stuck while opening the login page


        <ion-list id="login-list1" class="">
            <label class="item item-input " id="login-input1">
                <span class="input-label">Username</span>
                <input type="text" placeholder="">
            <label class="item item-input " id="login-input2">
                <span class="input-label">Password</span>
                <input type="password" placeholder="">
        <div class="spacer" style="height: 40px;"></div>
        <a ui-sref="chats" id="login-button3" style="border-radius:15px 15px 15px 15px;" class="button button-calm button-block ">Log in</a>

I dont Understand what goes wrong with this , I am not able to call the login.hrml page while click login button from index.html


var app =angular.module(‘app’,[‘ngRoute’]);

Use ui.router not ngRoute…,
Below is the link for Official documentation of ui-router

still not working after adding the ui-route