Skip to content

Commit 22cfaca

Browse files
revert: remove standalone migration changes from playground
1 parent 286b64a commit 22cfaca

File tree

5 files changed

+17
-33
lines changed

5 files changed

+17
-33
lines changed

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

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

3333
TestBed.configureTestingModule({
34-
imports: [AppComponent, RouterTestingModule, ReactiveFormsModule],
34+
declarations: [AppComponent],
35+
imports: [RouterTestingModule, ReactiveFormsModule],
3536
providers: [
3637
{
3738
provide: AuthService,

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

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

2110
@Component({
2211
selector: 'app-root',
2312
templateUrl: './app.component.html',
2413
styleUrls: ['./app.component.css'],
25-
imports: [
26-
AsyncPipe,
27-
JsonPipe,
28-
UpperCasePipe,
29-
NgIf,
30-
ReactiveFormsModule,
31-
RouterOutlet,
32-
],
3314
})
3415
export class AppComponent implements OnInit {
3516
isAuthenticated$ = this.auth.isAuthenticated$;

projects/playground/src/app/app.module.ts

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,20 +35,24 @@ const configInitializer =
3535
.then((loadedConfig: any) => config.set(loadedConfig)); // Set the config that was loaded asynchronously here
3636

3737
@NgModule({
38-
declarations: [],
39-
bootstrap: [AppComponent],
40-
imports: [
41-
BrowserModule,
42-
AppRoutingModule,
43-
ReactiveFormsModule,
44-
AuthModule.forRoot(/* authConfig */),
38+
declarations: [
4539
AppComponent,
4640
ProtectedComponent,
4741
UnprotectedComponent,
4842
ChildRouteComponent,
4943
NestedChildRouteComponent,
5044
ErrorComponent,
5145
],
46+
bootstrap: [AppComponent],
47+
imports: [
48+
BrowserModule,
49+
AppRoutingModule,
50+
ReactiveFormsModule,
51+
// This playground has been configured by default to use dynamic configuration.
52+
// If you wish to specify configuration to `forRoot` directly, uncomment `authConfig`
53+
// here, and comment out the APP_INITIALIZER config in the providers array below.
54+
AuthModule.forRoot(/* authConfig */),
55+
],
5256
providers: [
5357
{
5458
provide: APP_INITIALIZER,
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { Component } from '@angular/core';
2-
import { RouterOutlet } from '@angular/router';
32

43
@Component({
54
selector: 'app-child-route',
@@ -9,6 +8,5 @@ import { RouterOutlet } from '@angular/router';
98
<router-outlet></router-outlet>
109
`,
1110
styles: [],
12-
imports: [RouterOutlet],
1311
})
1412
export class ChildRouteComponent {}

projects/playground/src/app/lazy-module.module.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { LazyModuleRoutingModule } from './lazy-module-routing.module';
55
import { LazyModuleComponent } from './components/lazy-module.component';
66

77
@NgModule({
8-
declarations: [],
9-
imports: [CommonModule, LazyModuleRoutingModule, LazyModuleComponent],
8+
declarations: [LazyModuleComponent],
9+
imports: [CommonModule, LazyModuleRoutingModule],
1010
})
1111
export class LazyModuleModule {}

0 commit comments

Comments
 (0)