I am using Angularjs and ui-router. In my application I have an email feedback form and the email text will contain the URL of the application. But when I run the application this could be:

```
localhost:1828 or the www.domain.name

```

Is there a way in my application that I could get the URL and the port so I could add this into the email?