javascript - AngularJS redirect $location.path('examp.html') -
im struggeling redirect function, when im calling function there infornt of main domainpath /#!/ http://domain.de/backend/#!/splitscreen.html
var app = angular.module('loginapp', []); app.controller('loginctrl', function($scope, $location) { $scope.email = "exampel@adress.de"; $scope.password = "password"; $scope.login = function () { $location.path(); if($scope.email === "exampel@adress.de" || $scope.password === "pw"){ console.log($location.path('splitscreen.html')) $location.path('splitscreen.html'); }else{ $scope.alertmsg = "wrong email or password" } }; });
Comments
Post a Comment