wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

SkillMetrix Test (Angular)

Total questions: 20

Worksheet time: 10mins

Name
Class
Date
1.
Lifecycle Hook ใดทำงานก่อนที่ Component จะถูกทำลาย?
a)
ngOnInit
b)
ngAfterViewInit
c)
ngAfterContentInit
d)
ngOnDestroy
2.
องค์ประกอบใดใช้สำหรับการกำหนด Routing ใน Angular?
a)
RouterModule
b)
HttpClientModule
c)
NgModule
d)
FormsModule
3.
การเชื่อมข้อมูลใน Angular เรียกว่าอะไร?
a)
State Management
b)
Event Binding
c)
Data Binding
d)
Property Injection
4.
Angular ใช้ Dependency Injection เพื่อทำอะไร?
a)
โหลดข้อมูล
b)
จัดการ Lifecycle Hooks
c)
ดการ Service และ Dependency
d)
จัดการ Component Tree
5.
HttpClient ใช้สำหรับทำอะไรใน Angular?
a)
สร้าง Component
b)
จัดการ Routing
c)
ทำงานกับ HTTP Request
d)
จัดการ Service
6.
Directive ใดใช้สำหรับการแสดง/ซ่อนเนื้อหา?
a)
*ngIf
b)
*ngFor
c)
*ngSwitch
d)
*ngClass
7.
ViewChild ใช้สำหรับทำอะไรใน Angular?
a)
จัดการ Event Binding
b)
เข้าถึง Component หรือ DOM Child
c)
จัดการ Property Binding
d)
เข้าถึง Parent Component
8.
Angular ใช้ pattern อะไรในการพัฒนา?
a)
MVC
b)
MVVM
c)
Flux
d)
Singleton
9.
องค์ประกอบใดใน Angular ที่ใช้สำหรับการจัดการ state ของ Component?
a)
Decorators
b)
Services
c)
Directives
d)
Property Binding
10.
Angular ใช้ไฟล์ใดเป็น entry point หลักของแอปพลิเคชัน?
a)
index.html
b)
main.ts
c)
app.module.ts
d)
polyfills.ts
11.
ในไฟล์ app.module.ts ข้อใดใช้สำหรับประกาศ Component?
a)
imports
b)
declarations
c)
providers
d)
bootstrap
12.

ผู้ใช้คลิกปุ่ม 3 ครั้ง จะได้ผลลัพธ์อะไรใน <p>?

a)
0
b)
1
c)
2
d)
3
13.
ถ้าต้องการส่งข้อมูลจาก Parent Component ไปยัง Child Component ควรใช้ Decorator ใด?
a)
@ViewChild
b)
@Input
c)
@Output
d)
@HostListener
14.

ผลลัพธ์ของโค้ดนี้คืออะไร?

a)
Visible
b)
Not Visible
c)
Error
d)
ไม่แสดงอะไรเลย
15.
ข้อใดคือตัวอย่างการใช้งาน Reactive Forms ใน Angular?
a)
this.form = this.fb.group({ name: [''], age: [0], });
b)
<form> <input name="name"> <input name="age"> </form>
c)
this.formBuilder.array(['']);
d)
<form></form>
16.
RouterLink ใน Angular ใช้ทำอะไร?
a)
เชื่อมโยง HTTP API
b)
แสดงลิงก์สำหรับเปลี่ยน Route
c)
ส่งข้อมูลจาก Parent ไป Child
d)
กรองข้อมูลใน Form
17.
ข้อใดต่อไปนี้ใช้สำหรับตั้งค่า HTTP Interceptor ใน Angular?
a)
HttpClientModule
b)
RouterModule
c)
Providers ใน app.module.ts
d)
FormsModule
18.
หากต้องการให้ @Input อัปเดตเมื่อค่าถูกเปลี่ยน ควรใช้ Lifecycle Hook ใด?
a)
ngOnInit
b)
ngOnChanges
c)
ngAfterViewInit
d)
ngDoCheck
19.
Directive ใดใช้สำหรับกำหนดเงื่อนไขใน Angular?
a)
ngStyle
b)
ngIf
c)
ngClass
d)
ngSwitch
20.
ขอให้โชคดีกับการสอบ
a)
เดาข้อ 1
b)
เดาข้อ 2
c)
เดาข้อ 3
d)
เดาข้อ 4