ng-show
توجيه AngularJS
مثال
إظهار قسم عند تحديد خانة اختيار:
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. |