title: How to get the current url in the browser in Angular 2 using TypeScript?
body: <p>I need to get the current URL present in the browser in my Angular 2 application. </p>
  
  <p>In JavaScript normally we do it using the window object.</p>
  
  <p>How can I do this in Angular 2 using TypeScript?</p>
  
  <p>Thanks.</p>