[英]How can I obtain URI components using angular.js
您不需要Angular,只需執行以下操作:
var url = document.URL.split('/'); // Get the current full url, eg: http://domain.com/photo/1 splitted by slashes
var lastArg = url[url.length]; // Get the last string after the last slash
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.