$http.get("check_login.php")
.success(function(response) {
if(response.login == 1 || response.login == 2) {
window.location.href = 'new.html';
event.preventDefault();
}
if(response.login == 0 || response.login == undefined) {
window.location.href = 'index.html';
event.preventDefault();
}
});
答案 0 :(得分:0)
我认为您应该了解routing
中的AngularJs
,请仔细阅读这些链接。
http://www.w3schools.com/angular/angular_routing.asp
https://scotch.io/tutorials/single-page-apps-with-angularjs-routing-and-templating