-
Notifications
You must be signed in to change notification settings - Fork 309
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: support signal inputs, queries and model (#2303)
- Loading branch information
1 parent
97a3210
commit 7f7a22f
Showing
21 changed files
with
60 additions
and
3,056 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,4 @@ node_modules/ | |
src/**/__snapshots__/ | ||
e2e/__tests__/__snapshots__/ | ||
CHANGELOG.md | ||
src/transformers/jit_transform.js |
27 changes: 27 additions & 0 deletions
27
e2e/ast-transformers/ng-jit-transformers/__tests__/signal-inputs.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { Component, input } from '@angular/core'; | ||
import { TestBed } from '@angular/core/testing'; | ||
|
||
test('signal inputs', () => { | ||
@Component({ | ||
selector: 'greet', | ||
standalone: true, | ||
template: 'Name: {{name()}}', | ||
}) | ||
class GreetCmp { | ||
name = input.required<string>(); | ||
} | ||
|
||
@Component({ | ||
standalone: true, | ||
imports: [GreetCmp], | ||
template: '<greet [name]="name" />', | ||
}) | ||
class TestCmp { | ||
name = 'John'; | ||
} | ||
|
||
const fixture = TestBed.createComponent(TestCmp); | ||
fixture.detectChanges(); | ||
|
||
expect(fixture.nativeElement.textContent).toBe('Name: John'); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.