I have a controller in Angular js which gets the data based on query string.
The url is something like this
inbound-agent#/?phone=2343434
if ($location.search().phone) {
var phone = $location.search().phone;
//Get data
}
The problem is whenever I change the value of phone and press enter, the controller code doesn't execute and page is not refreshed.
However, it does executes on the second time enter is pressed. The data is refreshed. It also works fine if I press Reload after the query string is changed first time.
Can anyone tell me why is this behavior? I want to get the updated data when someone changes the query string manually and presses enter first time.
I am using Chrome 38.