我是一個初學者到Angular JS和Salesforce技術。如何獲取網址參數,當它開始與#?
有一個salesforce的API,它返回結果如下。
http://localhost:63342/www/index.html#/#access_token=access_token&refresh_token=refresh_token&instance_url=url&id=id&issued_at=1444216583754&signature=sign&scope=scope&token_type=Bearer
這裏,URL參數開始以哈希(#)。
如果將與問號(?)開始像
http://localhost:63342/www/index.html#/?access_token=access_token&refresh_token=refresh_token&instance_url=url&id=id&issued_at=1444216583754&signature=sign&scope=scope&token_type=Bearer
那麼我可以簡單地使用$location.search
方法,但銷售人員沒有迴應這樣的說法。
所以我的問題是訪問Angular JS中的URL參數。
編輯:
我用$location.hash
它給了我如下結果:
#/#access_token=access_token&refresh_token=refresh_token&instance_url=url&id=id&issued_at=1444216583754&signature=sign&scope=scope&token_type=Bearer
我也試過$location.hash.acess_token
但不工作。
我想訪問個人蔘數,有沒有辦法做到這一點?
謝謝!幫了很多忙。 –