Button click on opening the Page in ionic

dsdsfsfsfsfsfsfsfdsfsfdhi 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.


Demo App

    <ion-content paging="true" class="has-header">
            <img src="img/Logo.jpg" width="100%" height="auto" style="display:block;margin-left:auto;margin-right:auto;" />
            <img src="img/Team.jpg" width="70%" height="auto" style="display:block;margin-left:auto;margin-right:auto;" />
        <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>

        <div class="bar  bar-footer bar-calm">
            <div class="title">
                Copyright <strong></strong></label>


<!--<ion-nav-bar class="bar-stable">
    <ion-nav-bar-button class="button-icon"></ion-nav-bar-button>

--> Routes.js

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


Username Password
Log in Or create an account

Please add a demo in the codepen.