Skip to content

Commit a57ad7d

Browse files
Anh Phamahnpnl
authored andcommitted
feat: support signal queries in Angular 17.2
1 parent 1375c2d commit a57ad7d

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import { Component, ElementRef, viewChild } from '@angular/core';
2+
import { TestBed } from '@angular/core/testing';
3+
4+
test('signal queries', () => {
5+
@Component({
6+
selector: 'greet',
7+
standalone: true,
8+
template: '<input #el>',
9+
})
10+
class GreetCmp {
11+
input = viewChild.required<ElementRef>('el');
12+
}
13+
14+
const fixture = TestBed.createComponent(GreetCmp);
15+
fixture.detectChanges();
16+
17+
expect(fixture.componentInstance.input()).toBeDefined();
18+
});

0 commit comments

Comments
 (0)