AngularJS ng-show
ညွှန်ကြားချက်
ဥပမာ
checkbox ကို အမှန်ခြစ်ထားသောအခါ ကဏ္ဍတစ်ခုကို ပြပါ-
Show HTML: <input type="checkbox" ng-model="myVar">
<div
ng-show="myVar">
<h1>Welcome</h1>
<p>Welcome to my home.</p>
</div>
အဓိပ္ပါယ်နှင့် အသုံးပြုမှု
ng-show
စကားရပ်က မှန်သည်ဟု အကဲဖြတ်ပါက၊ သို့မဟုတ်ပါက HTML ဒြပ်စင်ကို ဝှက်ထားမည်ဆိုပါက ညွှန်ကြားချက်တွင် သတ်မှတ်ထားသော HTML အစိတ်အပိုင်းကို ပြသသည် ။
အထားအသို
<element ng-show="expression"></element>
HTML ဒြပ်စင်များအားလုံးမှပံ့ပိုးထားသည်။
ကန့်သတ်တန်ဖိုးများ
Value | Description |
---|---|
expression | An expression that will show the element only if the expression returns true. |