http://stackoverflow.com/questions/20645783/how-can-i-get-the-full-url-of-the-current-ui-router-state
获取部分URL,以下两种方法均可,结果为/app/url,不包括#,包括/:
$location.url();
<pre name="code" class="javascript">$location.path();
获取完整URL:
window.location
转到某个URL:
$location.path('/app/url');