I have a button in which i have registered a click event . Now as per my requirement i want my current page to route to next page using Angular JS routing .I am trying to add routing code in my click event but its not happening. Here is my Angular JS code..
var app = angular.module('LoginApp', ['ngRoute']);
app.config(function ($routeProvider) {
app.controller('LoginformController', function ($scope) {
$scope.LoginCheck=function () {
alert("Trying to login !");
}
});
Now after alert i want this page to navigate to 'Home.html'.Please help me how to route to 'Home.html' after alert message.Thanks
I am trying to add below code but the page is not navigating ..
app.config(function ($routeProvider) {
app.controller('LoginformController', function ($scope,$location) {
$scope.LoginCheck=function () {
alert("Trying to login !");
$location.path('/Home.html');
}
$scope.PasswordRecovery = function () {
alert("Clicked 2");
}
});
});