title: Parse url string object into host name in AngularJS
body: <p>I have a scope variable that returns me an absolute url stored by the user. While displaying I would like to only show the host name for the given object.</p>
  
  <p>for example.
   $scope.url ="www.myurl.com/zyas?nxs"</p>
  
  <p>i want to only display it as www.myurl.com.</p>
  
  <p>How can I achieve this?</p>