-
Notifications
You must be signed in to change notification settings - Fork 3.4k
feat: add support for Angular 21 #33004
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
92575a3
feat: add support for Angular 21
AtofStryker 97ece9a
convert old rxjs code from angular 18+ to signals as this is the new …
AtofStryker df91f73
clean up fixtures
AtofStryker c2b4c8d
update caffold-config docs
AtofStryker 1289c9c
readd tsconfig faux config as its needed for the schematic tess
AtofStryker cc8305a
fix issue with incorrect placement of tsconfig in angular config
AtofStryker 3a67480
Update system-tests/projects/angular-21/README.md
AtofStryker File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
15 changes: 7 additions & 8 deletions
15
...em-tests/project-fixtures/angular/src/app/components/another-child-providers.component.ts
This file contains hidden or 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 |
|---|---|---|
| @@ -1,21 +1,20 @@ | ||
| import { Component } from '@angular/core' | ||
| import { Component, signal } from '@angular/core' | ||
| import { ChildProvidersService } from './child-providers.service' | ||
| import { take } from 'rxjs/operators' | ||
|
|
||
| @Component({ | ||
| selector: 'app-another-child', | ||
| standalone: false, | ||
| template: `<button (click)="handleClick()">{{ message }}</button>`, | ||
| template: `<button (click)="handleClick()">{{ message() }}</button>`, | ||
| providers: [ChildProvidersService], | ||
| }) | ||
| export class AnotherChildProvidersComponent { | ||
| message = 'default another child message' | ||
| message = signal('default another child message') | ||
|
|
||
| constructor (private readonly service: ChildProvidersService) {} | ||
|
|
||
| handleClick (): void { | ||
| this.service.getMessage().pipe( | ||
| take(1), | ||
| ).subscribe((message) => this.message = message) | ||
| async handleClick (): Promise<void> { | ||
| const message = await this.service.getMessage() | ||
|
|
||
| this.message.set(message) | ||
| } | ||
| } |
15 changes: 7 additions & 8 deletions
15
system-tests/project-fixtures/angular/src/app/components/child-providers.component.ts
This file contains hidden or 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 |
|---|---|---|
| @@ -1,20 +1,19 @@ | ||
| import { Component } from '@angular/core' | ||
| import { Component, signal } from '@angular/core' | ||
| import { ChildProvidersService } from './child-providers.service' | ||
| import { take } from 'rxjs/operators' | ||
|
|
||
| @Component({ | ||
| selector: 'app-child-providers', | ||
| standalone: false, | ||
| template: `<button (click)="handleClick()">{{ message }}</button>`, | ||
| template: `<button (click)="handleClick()">{{ message() }}</button>`, | ||
| }) | ||
| export class ChildProvidersComponent { | ||
| message = 'default message' | ||
| message = signal('default message') | ||
|
|
||
| constructor (private readonly service: ChildProvidersService) {} | ||
|
|
||
| handleClick (): void { | ||
| this.service.getMessage().pipe( | ||
| take(1), | ||
| ).subscribe((message) => this.message = message) | ||
| async handleClick (): Promise<void> { | ||
| const message = await this.service.getMessage() | ||
|
|
||
| this.message.set(message) | ||
| } | ||
| } |
12 changes: 4 additions & 8 deletions
12
system-tests/project-fixtures/angular/src/app/components/child-providers.service.ts
This file contains hidden or 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 |
|---|---|---|
| @@ -1,15 +1,11 @@ | ||
| import { Injectable } from '@angular/core' | ||
| import { HttpClient } from '@angular/common/http' | ||
| import { Observable } from 'rxjs' | ||
| import { map } from 'rxjs/operators' | ||
|
|
||
| @Injectable() | ||
| export class ChildProvidersService { | ||
| constructor (private readonly http: HttpClient) {} | ||
| async getMessage (): Promise<string> { | ||
| const response = await fetch('https://myfakeapiurl.com/api/message') | ||
| const data = await response.json() | ||
|
|
||
| getMessage (): Observable<string> { | ||
| return this.http.get<{ message: string }>('https://myfakeapiurl.com/api/message').pipe( | ||
| map((response) => response.message), | ||
| ) | ||
| return data.message | ||
| } | ||
| } |
13 changes: 4 additions & 9 deletions
13
system-tests/project-fixtures/angular/src/app/components/counter.component.ts
This file contains hidden or 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 |
|---|---|---|
| @@ -1,21 +1,16 @@ | ||
| import { Component } from '@angular/core' | ||
| import { CounterService } from './counter.service' | ||
| import { Component, model } from '@angular/core' | ||
|
|
||
| @Component({ | ||
| selector: 'counter-component', | ||
| standalone: false, | ||
| template: `<button (click)="increment()"> | ||
| Increment: {{ count$ | async }} | ||
| Increment: {{ count() }} | ||
| </button>`, | ||
| }) | ||
| export class CounterComponent { | ||
| count$ | ||
|
|
||
| constructor (private counterService: CounterService) { | ||
| this.count$ = this.counterService.count$ | ||
| } | ||
| count = model<number>(0) | ||
AtofStryker marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| increment () { | ||
| this.counterService.increment() | ||
| this.count.set(this.count() + 1) | ||
| } | ||
| } | ||
12 changes: 0 additions & 12 deletions
12
system-tests/project-fixtures/angular/src/app/components/counter.service.ts
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.