Skip to content

Commit b8b0c2d

Browse files
refactor: migrate to standalone components and fix imports
- Convert AppComponent and test components to standalone - Add required imports (NgIf, AsyncPipe, UpperCasePipe, etc.) - Update test configuration to import standalone components - Fix all linting errors related to standalone components
1 parent b748c62 commit b8b0c2d

File tree

3 files changed

+23
-5
lines changed

3 files changed

+23
-5
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export default { name: '@auth0/auth0-angular', version: '2.3.0' };
1+
export default { name: '@auth0/auth0-angular', version: '2.4.0' };

projects/playground/src/app/app.component.spec.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,7 @@ describe('AppComponent', () => {
3131
} as any;
3232

3333
TestBed.configureTestingModule({
34-
declarations: [AppComponent],
35-
imports: [RouterTestingModule, ReactiveFormsModule],
34+
imports: [AppComponent, RouterTestingModule, ReactiveFormsModule],
3635
providers: [
3736
{
3837
provide: AuthService,

projects/playground/src/app/app.component.ts

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,35 @@
11
import { Component, Inject, OnInit } from '@angular/core';
2-
import { UntypedFormGroup, UntypedFormControl } from '@angular/forms';
2+
import {
3+
UntypedFormGroup,
4+
UntypedFormControl,
5+
ReactiveFormsModule,
6+
} from '@angular/forms';
37
import { AuthService } from '../../../auth0-angular/src/lib/auth.service';
48
import { iif } from 'rxjs';
59
import { first } from 'rxjs/operators';
6-
import { DOCUMENT } from '@angular/common';
10+
import {
11+
DOCUMENT,
12+
AsyncPipe,
13+
JsonPipe,
14+
UpperCasePipe,
15+
NgIf,
16+
} from '@angular/common';
717
import { HttpClient } from '@angular/common/http';
818
import { LogoutOptions } from 'projects/auth0-angular/src/lib/interfaces';
19+
import { RouterOutlet } from '@angular/router';
920

1021
@Component({
1122
selector: 'app-root',
1223
templateUrl: './app.component.html',
1324
styleUrls: ['./app.component.css'],
25+
imports: [
26+
AsyncPipe,
27+
JsonPipe,
28+
UpperCasePipe,
29+
NgIf,
30+
ReactiveFormsModule,
31+
RouterOutlet,
32+
],
1433
})
1534
export class AppComponent implements OnInit {
1635
isAuthenticated$ = this.auth.isAuthenticated$;

0 commit comments

Comments
 (0)