$compile function can not find widget after finding it the first time

I have a search page where user enters a query and then results get updated with $http service.

I use $compile to display different types of widgets. What happens is when I visit the page first time/reload the page everything works fine but when I set the location using something like following

$location.path("/search/" + $scope.q);

and that in turn triggers the controller and whole search process, the $compile function is unable to find the widget.

What might be the reason for this?

Edit : I found the issue why $compile worked first time but not after that. One more thing I found out later was that view was getting updated i.e. everything started to work fine after typing something in text box. Issue was/is related to $templateCache. Basically cache callback wasn't happening till there was some user interaction from user like typing in input box or deleting a character from an input which has associated model binding.

After removing cache usage by editing source of angular it worked fine. Raised an issue for this on angular

https://github.com/angular/angular.js/issues/1927