I have a login page and a home page in my sample POC. 

When user completed signed in, then i have redirect to home page from login page. 

I have tried this below codes for redirecting to home page from login page using by `angular.$location`

Code 1
------

```
 $location.path("/home");

```

This code is working good.No issues. 

Code 2
------

```
$location.$$path="/home";

```

*This code does not working probably, because the page is redirected, but URL is shown previous URL,**does not changed the redirected URL**.* 

> 
> * Why is this happened?
> * What is the difference between **code1** and **code2**
> 
> 
>