0
目前我硬編碼鏈路,諸如以下共享角2當前路線要在鏈接在,微博和Facebook
<a href="https://twitter.com/home?status=http%3A//www.beeps.com%3A7002/index.html" class="SHARE TWITTER" onclick='window.open(this.href,"popupwindow", "width=800,height=500,left=200,top=5,scrollbars,toolbar=0,resizable"); return false;' target="social"></a>
Facebook的:
<a href="https://www.facebook.com/sharer/sharer.php?u=http%3A//www.beeps.com%3A7002/index.html" class="SHARE FACEBOOK" onclick='window.open(this.href,"popupwindow", "width=800,height=500,left=200,top=5,scrollbars,toolbar=0,resizable"); return false;' target="social"></a>
從Linked In,Twitter或Facebook引用時,所有這些鏈接似乎都有效 - 但我想創建一個Angular 2,它基於當前的Angular 2路線替換<a>
元素的&url=http%3A//www.beeps.com%3A7002/index.html
部分,所以我們沒有對每個頁面進行硬編碼。