ရိုးရိုးလေး ရှင်းပြမယ်
Angular HOME ကို ရိုးရိုးလေးနားလည်မယ်
ဒီ Angular လမ်းညွှန်မှာ အခြေခံ concept ကနေ real-world single-page application တည်ဆောက်ရာမှာလိုအပ်တဲ့ structure, routing, forms, API ချိတ်ဆက်မှု, service design, RxJS နှင့် performance idea တွေအထိ အဆင့်လိုက် လေ့လာနိုင်ပါတယ်။
Problem → Why → Solution
ပြဿနာ — ဘာကြောင့် ဒီ concept လိုတာလဲ
CLI code ကို copy လုပ်ပြီး screen ပေါ်တာတစ်ခုတည်းကြည့်ခြင်းက component boundaries နဲ့ data flow ကိုမနားလည်စေပါ။
ဖြစ်လေ့ရှိတဲ့အမှား
Happy path တစ်ခုအောင်တာနဲ့ feature မှန်ပြီဟုယူဆခြင်းက empty, loading, error နဲ့ cleanup bugs များကိုလွတ်စေနိုင်ပါတယ်။
Core Concept — အလုပ်လုပ်ပုံကိုနားလည်မယ်
Angular ကို syntax စုစည်းမှုအဖြစ်မဟုတ်ဘဲ component tree, reactive state, dependency injection, routing နဲ့ data flow တို့ပေါင်းထားတဲ့ application framework အဖြစ်လေ့လာပါ။ Standalone components က project အသစ်များအတွက် ရိုးရှင်းသော default ဖြစ်သော်လည်း NgModule အခြေပြု project အဟောင်းတွေကိုလည်း ဖတ်နိုင်ရပါမယ်။ Template က state ကိုပြပြီး event က user action ကို component ဆီပြန်ပို့ကာ service က shared logic နဲ့ external data ကိုကိုင်တယ်ဆိုတဲ့ mental model တည်ဆောက်ပါ။
- Input + state
- Component + template
- Rendered Angular UI
Angular HOME ရဲ့ core concept နဲ့ Angular data flow ကိုရှင်းပြနိုင်ရန်
အဓိက Syntax / Pattern
import { Component } from '@angular/core';
@Component({
selector: 'app-root',
template: '<h1>Angular HOME</h1>',
})
export class AppComponent {}Angular ကို syntax စုစည်းမှုအဖြစ်မဟုတ်ဘဲ component tree, reactive state, dependency injection, routing နဲ့ data flow တို့ပေါင်းထားတဲ့ application framework အဖြစ်လေ့လာပါ။ Standalone components က project အသစ်များအတွက် ရိုးရှင်းသော default ဖြစ်သော်လည်း NgModule အခြေပြု project အဟောင်းတွေကိုလည်း ဖတ်နိုင်ရပါမယ်။ Template က state ကိုပြပြီး event က user action ကို component ဆီပြန်ပို့ကာ service က shared logic နဲ့ external data ကိုကိုင်တယ်ဆိုတဲ့ mental model တည်ဆောက်ပါ။
Code ကို အဆင့်လိုက်ဖတ်မယ်
- Input + state
import { Component } from '@angular/core';ဒီ Angular လမ်းညွှန်မှာ အခြေခံ concept ကနေ real-world single-page application တည်ဆောက်ရာမှာလိုအပ်တဲ့ structure, routing, forms, API ချိတ်ဆက်မှု, service design, RxJS နှင့် performance idea တွေအထိ အဆင့်လိုက် လေ့လာနိုင်ပါတယ်။
- Component + template
template: '<h1>Angular HOME</h1>',Angular ကို syntax စုစည်းမှုအဖြစ်မဟုတ်ဘဲ component tree, reactive state, dependency injection, routing နဲ့ data flow တို့ပေါင်းထားတဲ့ application framework အဖြစ်လေ့လာပါ။ Standalone components က project အသစ်များအတွက် ရိုးရှင်းသော default ဖြစ်သော်လည်း NgModule အခြေပြု project အဟောင်းတွေကိုလည်း ဖတ်နိုင်ရပါမယ်။ Template က state ကိုပြပြီး event က user action ကို component ဆီပြန်ပို့ကာ service က shared logic နဲ့ external data ကိုကိုင်တယ်ဆိုတဲ့ mental model တည်ဆောက်ပါ။
- Rendered Angular UI
export class AppComponent {}Lesson တစ်ခန်းစီမှာ UI state ဘယ်မှာပိုင်သလဲ၊ ဘယ် event ကပြောင်းသလဲ၊ dependency ဘယ်ကဝင်သလဲကို diagram သေးသေးဆွဲပြီး example ကိုကိုယ်တိုင်ပြန်တည်ဆောက်ပါ။
- Input + state
- Component + template
- Rendered Angular UI
Success
Angular HOME ရဲ့ core concept နဲ့ Angular data flow ကိုရှင်းပြနိုင်ရန်
Failure
CLI code ကို copy လုပ်ပြီး screen ပေါ်တာတစ်ခုတည်းကြည့်ခြင်းက component boundaries နဲ့ data flow ကိုမနားလည်စေပါ။
ဒီ Angular လမ်းညွှန်မှာ အခြေခံ concept ကနေ real-world single-page application တည်ဆောက်ရာမှာလိုအပ်တဲ့ structure, routing, forms, API ချိတ်ဆက်မှု, service design, RxJS နှင့် performance idea တွေအထိ အဆင့်လိုက် လေ့လာနိုင်ပါတယ်။
🎯 သင်လေ့လာမည့်အရာများ
• Angular app တစ်ခု၏ အခြေခံဖွဲ့စည်းပုံ — TypeScript, Components, Templates, Modules
• Data binding နှင့် directives အသုံးပြုပုံ
• Form validation, services, dependency injection နှင့် API data ခေါ်သုံးပုံ
• Routing, route guards, lazy loading နှင့် maintainable project structure
• Code example တစ်ခုစီမှာ ဘာလုပ်နေသလဲ၊ ဘာကိုသတိထားရမလဲ၊ ဘယ်လို project တွေမှာသုံးလဲဆိုတာကိုပါ တွဲဖတ်နိုင်ပါတယ်။
ဘယ်ဘက် lesson menu ကနေ အဆင့်လိုက်သွားပါ။ အစပိုင်းမှာ syntax ကိုအလွတ်မကျက်ဘဲ “data ဘယ်ကလာပြီး UI ဘယ်လိုပြောင်းသလဲ” ဆိုတာကို ဦးစားပေးနားလည်ပါ။
Real-world usage
လက်တွေ့ Project မှာ ဘယ်လိုသုံးမလဲ
Lesson တစ်ခန်းစီမှာ UI state ဘယ်မှာပိုင်သလဲ၊ ဘယ် event ကပြောင်းသလဲ၊ dependency ဘယ်ကဝင်သလဲကို diagram သေးသေးဆွဲပြီး example ကိုကိုယ်တိုင်ပြန်တည်ဆောက်ပါ။
Mini challenge
ကိုယ်တိုင်တည်ဆောက်ကြည့်ပါ
Angular HOME နမူနာကို copy မလုပ်ဘဲ ကိုယ်တိုင်ပြန်ရေးပါ။ Normal state နှစ်ခု၊ edge case တစ်ခုနှင့် failure state တစ်ခုထည့်ပြီး expected UI နဲ့ state transition ကိုမ run မီရေးထားပါ။
- Example ကို copy မလုပ်ဘဲ ပြန်ရေးပါ
- Normal input နဲ့ edge case စမ်းပါ
- Run မလုပ်မီ compiler/output result ကိုခန့်မှန်းပါ
import { Component } from '@angular/core';
@Component({
selector: 'app-root',
template: '<h1>Angular HOME</h1>',
})
export class AppComponent {}ရလဒ်: Angular HOME ရဲ့ core concept နဲ့ Angular data flow ကိုရှင်းပြနိုင်ရန်
အရိပ်အမြွက် ကြည့်ရန်
Lesson တစ်ခန်းစီမှာ UI state ဘယ်မှာပိုင်သလဲ၊ ဘယ် event ကပြောင်းသလဲ၊ dependency ဘယ်ကဝင်သလဲကို diagram သေးသေးဆွဲပြီး example ကိုကိုယ်တိုင်ပြန်တည်ဆောက်ပါ။
Quick Quiz 1 / 3
Quick Quiz 2 / 3
Quick Quiz 3 / 3
ဒီသင်ခန်းစာမှာ မှတ်ထားရမယ့်အချက်များ
- Input + state → Component + template → Rendered Angular UI
- Angular ကို syntax စုစည်းမှုအဖြစ်မဟုတ်ဘဲ component tree, reactive state, dependency injection, routing နဲ့ data flow တို့ပေါင်းထားတဲ့ application framework အဖြစ်လေ့လာပါ။ Standalone components က project အသစ်များအတွက် ရိုးရှင်းသော default ဖြစ်သော်လည်း NgModule အခြေပြု project အဟောင်းတွေကိုလည်း ဖတ်နိုင်ရပါမယ်။ Template က state ကိုပြပြီး event က user action ကို component ဆီပြန်ပို့ကာ service က shared logic နဲ့ external data ကိုကိုင်တယ်ဆိုတဲ့ mental model တည်ဆောက်ပါ။
- CLI code ကို copy လုပ်ပြီး screen ပေါ်တာတစ်ခုတည်းကြည့်ခြင်းက component boundaries နဲ့ data flow ကိုမနားလည်စေပါ။
- Lesson တစ်ခန်းစီမှာ UI state ဘယ်မှာပိုင်သလဲ၊ ဘယ် event ကပြောင်းသလဲ၊ dependency ဘယ်ကဝင်သလဲကို diagram သေးသေးဆွဲပြီး example ကိုကိုယ်တိုင်ပြန်တည်ဆောက်ပါ။
Angular — Overview — Angular