AngularJS ng-listညွှန်ကြားချက်


ဥပမာ

အသုံးပြုသူထည့်သွင်းမှုကို array တစ်ခုအဖြစ်သို့ ပြောင်းပါ-

<div ng-app="">

<input ng-model="customers" ng-list/>

<pre>{{customers}}</pre>

အဓိပ္ပါယ်နှင့် အသုံးပြုမှု

ညွှန်ကြားချက်သည် ကော် မာ ng-listကို ပုံသေ ခြားနားချက်အဖြစ် အသုံးပြု၍ string တစ်ခုအား လိုင်းတစ်ခု၏ array တစ်ခုအဖြစ်သို့ ပြောင်းလဲသည်။

ညွှန်ကြားချက် သည် ng-listအခြားနည်းဖြင့်လည်း ပြောင်းပေးသည်၊ အကယ်၍ သင့်တွင် သင်ထည့်သွင်းသည့်ကွက်လပ်တစ်ခုတွင် string တစ်ခုအဖြစ်ပြသလိုသော string များရှိပါက၊ ထို့နောက် ng-listညွှန်ကြားချက်ကို ထည့်သွင်းသည့်အကွက်တွင် ထည့်ပါ။

attribute ၏တန်ဖိုး ng-listသည် separator ကိုသတ်မှတ်သည်။


အထားအသို

<element ng-list="separator"></element>

<input> နှင့် <textarea> ဒြပ်စင်များဖြင့် ပံ့ပိုးထားသည်။


ကန့်သတ်တန်ဖိုးများ

Value Description
separator Optional, defines the separator, default value is ", "