1

I have this .cshtml page to login

<main id="login" ng-controller="loginCtrl">
<div id="page" class="full-screen min-height">
    <div id="page-inner">
        <div id="login-page-content" class="min-height-inner container-padding">
            <div class="container center text-center">
                <h1>
                    <label>Login</label>
                </h1>
                <div id="login-form">
                    <div>
                        <input type="email" id="Username" placeholder="UserName/Email" class="login-input" required="required" />

                    </div>
                    <div>
                        <input type="password" id="Username" placeholder="Password" class="login-input" required="required" />
                    </div>
                    <div>

                    </div>
                    <div class="cf">
                        <input type="submit" value="Login" class="login-submit" ng-click="clicked()"/>
                    </div>
                </div>
                <a href="#!/forgotPassword"> Forgot Details ? </a>
            </div>
        </div>
    </div>
</div>

and this is my controller.js

angular.module('userManagement')
.controller('loginCtrl', ['$scope', '$http','$window', function ($scope, $http,$window) {
    $scope.clicked = function () {
        window.location = '#/join';
    }
}
]);

and also my app.js

 $routeProvider.caseInsensitiveMatch = true;

$routeProvider.when('/login', { templateUrl: 'Account/login', controller: 'loginCtrl' }); I want to be able to go to another page when i click the button, vallidations are not important for now I just want the buttons to go to the page when i click a button, with the above code it takes me to

http://localhost:52653/Account#!/login#%2Fjoin

1

1 Answer 1

2

You should use the angular route system or ui.router :

ngRoute and location

$location.path( "#/join" );

ui.router

$state.go(path_to_join_state);
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.