重定向到 Django 中的索引和 Angular

Redirection to index in Django and Angular

我有一个使用 Django 和 Angular 的项目。

我的索引页 http://localhost:8000/install/#/, that is part of the install app. There I have a button which POST a form, then I want the function in my controller to redirect to http://localhost:8000/ 有一个页面。

$http.post('install/send_install_form/', installation) //installation is a dictionary
        .then(function(data){
            alert('You will be redirected')
            setTimeout(function(){
                    // REDIRECTION TO THE INDEX..?
                },
                4000
            )
        },
        function(data){
            alert("Error")
        })

我们如何 link 使用 Django-Angular 应用程序之间和之外?

谢谢!

在 angularJS 应用内重定向:

scope.$apply(function() { 
   $location.path("/route"); 
});

重定向到 angularJS 应用之外:

window.location.replace('http://google.ca/');