AppML API


AppML API သည် AppML ၏ နည်းလမ်းများနှင့် ဂုဏ်သတ္တိများကို သတ်မှတ်သည်။


နည်းလမ်းများနှင့် ဂုဏ်သတ္တိများ မည်သို့လုပ်ဆောင်နိုင်သနည်း။

နည်းလမ်းများနှင့် ဂုဏ်သတ္တိများဖြင့် သင်လုပ်နိုင်သည်-

  • AppML အပလီကေးရှင်းများ ဖန်တီးပါ။
  • ဒေတာဖြင့် အပလီကေးရှင်းများကို ကျွေးမွေးပါ။
  • သင့်ဝဘ်စာမျက်နှာတွင် အသုံးပြုရန်အတွက် အပလီကေးရှင်းဒေတာကို ရယူပါ။

ဥပမာ

New AppML() သည် AppML အရာဝတ္ထုအသစ်တစ်ခုကို ဖန်တီးသည်။
dataSource
သည် AppML အရာဝတ္ထု၏ ဒေတာရင်းမြစ်ကို သတ်မှတ်သည်။
getData()
ဒေတာကို ရယူသည်။
data.records
တွင် data records များပါရှိသည်။

သင်သည် မှတ်တမ်းများကို လှည့်ပတ်ပြီး HTML အစိတ်အပိုင်းတစ်ခုတွင် အကြောင်းအရာကို ပြသနိုင်သည်-

ဥပမာ

// Create an AppML object and fetch the data
myObj = new AppML();
myObj.dataSource = "https://www.w3schools.com/appml/customers.php";
myObj.getData();

// Locate the data records
myArr = myObj.data.records;
len = myArr.length;

// Display the records
for (i = 0; i < len; i++) {
    txt += myArr[i].CustomerName + "<br>";
}
document.getElementById("demo").innerHTML = txt;

ရလဒ်

Alfreds Futterkiste
Berglunds snabbköp
Centro comercial Moctezuma
Ernst Handel
FISSA Fabrica Inter. Salchichas S.A.
Galería del gastrónomo
Island Trading
Königlich Essen
Laughing Bacchus Wine Cellars
Magazzini Alimentari Riuniti
North/South
Paris spécialités
Rattlesnake Canyon Grocery
Simons bistro
The Big Cheese
Vaffeljernet
Wolski Zajazd

အချို့သော AppML နည်းလမ်းများ

Method Description
new AppML() Creates a new AppML object
run() Runs an application object
appml("name") Returns the appml object with the specified name
displayMessage(text) Displays a specified message.
setError(no, description) Sets a specified error and error description.

အချို့သော AppML Properties

Property Description
appName The application name (the container id)
container The application container element
controller The application controller
data The application data object
dataSource The application data source
message The application message

အချို့သော Data Object Properties များ

Property Description
data.model The application data model
data.records The application data records