Familys is a genealogy mobile application, wrote with onsen ui v2.
https://play.google.com/store/apps/details?id=ga.oshimin.mobile.familys
I love JS
Familys is a genealogy mobile application, wrote with onsen ui v2.
https://play.google.com/store/apps/details?id=ga.oshimin.mobile.familys
Yes add the meta tag in your header (<head>…</head>).
Maybe the CSP (Content Security Policy) not allow this action, check the CSP of your html page (on local the localhost is trusted) .
this is sample 192.168.1.2 is the name of a server :
<meta http-equiv="Content-Security-Policy" content="
default-src 'self' data: gap: https://ssl.gstatic.com 'unsafe-eval' 'unsafe-inline' http://192.168.1.2;
style-src 'self' 'unsafe-inline';
font-src 'self';
connect-src 'self' http://192.168.1.2:8080 http://192.168.1.2 ws://192.168.1.2;
img-src 'self' data:"
/>
You can generate one here : http://cspisawesome.com.
I have error on migrate my application to ons2(2.0.0 pre5) with this code
function addElement (data){
var el = "<ons-list ></ons-list>".toDOM(); // toDOM convert String to DOM element
var li = '<ons-list-item onclick="api.execProg(this.config);">\
<ons-ripple lo></ons-ripple>\
<ons-icon rel="icon" icon="dot-circle-o" size="20px"></ons-icon>\
<span rel="title">Make a Call</span>\
</ons-list-item>';
for(var i in data.items){
if(data.items[i].title){
var e = li.toDOM();
e.querySelector('[rel="title"]').innerText = data.items[i].title;
e.querySelector('[rel="icon"]').setAttribute("icon",data.items[i].icon || 'dot-circle-o');
e.querySelector("ons-list-item").config = JSON.stringify(data.items[i]);
el.appendChild(e);
}
}
this.appendChild(el);
ons.compile(this) ; //Uncaught TypeError: ons.compile is not a function
api.applyColor();
};
// Usage Ex. : addElement.call(document.querySelector('#myRoot'),{title:"Mon titre",icon:"circle",extra: "cool"})
Error : Compile is not defined.