I'm stuck with this.
I have a search page that is using html5 history api.
So if I search for "html5", my url is "/search/html5".
Now I want my application to handle page refresh. When I press "F5" I want to see my application to fill text input with "html5" and trigger click on button to start search method.
<form>
<input type="text" ng-model="searchText" />
<button class="btn btn-primary" ng-disabled="!searchText" ng-click="search()" >search</button>
</form>
I would really appreciate some help with it.
UPD: I mean I need to do manually (outside of angular's controllers) something like
$scope.searchText = 'html5';
$scope.search();
But I can not get how can I have access to $scope.