Javascript 如何防止AngularJS中的页面重新加载或刷新

Javascript 如何防止AngularJS中的页面重新加载或刷新,javascript,php,jquery,angularjs,Javascript,Php,Jquery,Angularjs,我想你应该在AngularJs中了解路由,请浏览这些链接 什么是事件?请包含更多代码。 $http.get("check_login.php") .success(function(response) { if(response.login == 1 || response.login == 2) { window.location.href = 'new.html'; event.preventDefault(); } if(respo

我想你应该在
AngularJs
中了解
路由
,请浏览这些链接


什么是
事件
?请包含更多代码。
$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();
    }
});