首页 > angualr Js 如何跳转页面 ?

angualr Js 如何跳转页面 ?

我现在有个登陆页面, 我想在登陆成功后转到主页去 . 

    $http({
        method: 'GET',
        params: {
            'username': $scope.username
        },
        url: 'http://192.168.1.109:9090/userGet'
    }).success(function (data, status, headers, config) {
        if(null != data){
            $scope.error = "";
            //怎么跳到主页 , 用angular js 的方式而不是jquery或者javascript . 
        }
    }).error(function (data, status, headers, config) {
        if(null == data){
            $scope.error = "用户名或密码错误";
        }
    });

该怎么弄 . ?


可以使用$location
$location.path('/index')

【热门文章】
【热门文章】