Thuta Learning
ရှာဖွေရန်
BasicWeb Developmentintermediate

Property Binding [ ]

စိတ်လျှော့ပါ။ ဒီခန်းကို စာအုပ်လိုမဟုတ်ဘဲ စကားပြောသလိုပဲ၊ နားလည်လွယ်အောင် ရှင်းပါမယ်။

Property Binding [ ] ကိုအသုံးပြုပြီး HTML element ၏ property တစ်ခု (e.g., src, disabled) ကို component ၏ data နှင့် ချိတ်ဆက်နိုင်သည်။ Data သည် component မှ template သို့ one-wayစီးဆင်းသည်။

typescript
<img [src]="imageUrl">
<button [disabled]="isButtonDisabled">Click Me</button>

// component.ts
export class MyComponent {
  imageUrl = 'path/to/image.jpg';
  isButtonDisabled = true;
}
You should see
(Image တစ်ခုပေါ်လာပြီး button မှာ disabled (နှိပ်မရ) ဖြစ်နေမည်)
Property Binding [ ] | Thuta Learning