2015-12-28
原來圍巾的功用這麼多
如果問,圍巾用來做什麼? 幾乎所有的人一定會回答“保暖”,“防曬”…
其實你遠遠不懂,圍巾還是一種“良藥”。既說是藥,那請看看圍巾到底有哪些功效吧!
2015-12-03
Ionic 在 android 手機無法 $http post 網址的解決方案
Android 在 4.0.0 後有新增安全性,防止 app 存取外部開發者沒有允許的網址
故若你的 app 需要連外部網址,則需要將這些網址列入白名單 white-list (Cordova Whitelist)
在 Ionic 裡作法如下
1. 先在 shell 裡安裝 plugin
$ ionic plugin add
https://github.com/apache/cordova-plugin-whitelist.git
2. 在你的 Ionic 專案的 config.xml 裡加上
<allow-navigation href="*" />
"*" 代表所有網址都允許例如:
<platform name="android">
.....
.....
<allow-navigation href="*" />
</platform>
whitelist 設定的詳情請看
https://github.com/apache/cordova-plugin-whitelist#content-security-policy
‹
›
首頁
查看網路版