1

I am trying to make something somewhat like google, have a search bar that's able to search without refresh, and on submit update the URL, show content and able to switch to another page (like google shopping). and after switching still keeping the value in the input field and URL.

I'm rather new to angular, so it might be out there somewhere already but haven't found it yet.

Thanks! :)

  • 4
    Welcome to SO. Please visit the [help] to see what and how to ask. HINT: Post effort and CODE. Use the `<>` to post a [mcve]. You want to look at AJAX - for example http://stackoverflow.com/questions/22301754/how-to-change-the-url-in-the-browser-address-bar-when-content-is-loaded-in-ajax – mplungjan Mar 27 '17 at 12:10

2 Answers2

0

try:

window.history.pushState("object or string", "Title", "/newUrl");

0

According to your question I think you have to call one function on ng-blur in your search input which will fired one http request to get particular result for search query.

<input class="md-input" ng-model="search" ng-blur="getSearchResult(search)">
Arshad Shaikh
  • 564
  • 1
  • 3
  • 13