Skip to content

Commit e3b5405

Browse files
132007: Auto-fixed the ng generate @angular/core:control-flow issues
1 parent b4d694e commit e3b5405

File tree

18 files changed

+56
-85
lines changed

18 files changed

+56
-85
lines changed

src/app/browse-by/browse-by-geospatial-data/browse-by-geospatial-data.component.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import {
22
AsyncPipe,
33
isPlatformBrowser,
4-
NgIf,
54
} from '@angular/common';
65
import {
76
ChangeDetectionStrategy,
@@ -47,7 +46,6 @@ import { PaginatedSearchOptions } from '../../shared/search/models/paginated-sea
4746
imports: [
4847
AsyncPipe,
4948
GeospatialMapComponent,
50-
NgIf,
5149
TranslateModule,
5250
],
5351
standalone: true,

src/app/item-page/bitstreams/request-a-copy/altcha-captcha.component.ts

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
import {
2-
AsyncPipe,
3-
NgIf,
4-
} from '@angular/common';
51
import {
62
Component,
73
CUSTOM_ELEMENTS_SCHEMA,
@@ -11,21 +7,14 @@ import {
117
Output,
128
} from '@angular/core';
139
import { ReactiveFormsModule } from '@angular/forms';
14-
import { RouterLink } from '@angular/router';
1510
import { TranslateModule } from '@ngx-translate/core';
1611

17-
import { VarDirective } from '../../../shared/utils/var.directive';
18-
1912
@Component({
2013
selector: 'ds-altcha-captcha',
2114
templateUrl: './altcha-captcha.component.html',
2215
imports: [
23-
AsyncPipe,
24-
NgIf,
2516
ReactiveFormsModule,
26-
RouterLink,
2717
TranslateModule,
28-
VarDirective,
2918
],
3019
schemas: [CUSTOM_ELEMENTS_SCHEMA],
3120
standalone: true,

src/app/item-page/edit-item-page/item-bitstreams/item-bitstreams.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import {
22
AsyncPipe,
3-
CommonModule,
3+
NgClass,
44
} from '@angular/common';
55
import {
66
ChangeDetectorRef,
@@ -72,8 +72,8 @@ import { ItemEditBitstreamBundleComponent } from './item-edit-bitstream-bundle/i
7272
AlertComponent,
7373
AsyncPipe,
7474
BtnDisabledDirective,
75-
CommonModule,
7675
ItemEditBitstreamBundleComponent,
76+
NgClass,
7777
RouterLink,
7878
ThemedLoadingComponent,
7979
TranslateModule,

src/app/item-page/orcid-page/orcid-page.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import {
2-
CommonModule,
2+
AsyncPipe,
33
isPlatformBrowser,
44
} from '@angular/common';
55
import {
@@ -54,7 +54,7 @@ import { OrcidSyncSettingsComponent } from './orcid-sync-settings/orcid-sync-set
5454
styleUrls: ['./orcid-page.component.scss'],
5555
imports: [
5656
AlertComponent,
57-
CommonModule,
57+
AsyncPipe,
5858
OrcidAuthComponent,
5959
OrcidQueueComponent,
6060
OrcidSyncSettingsComponent,

src/app/item-page/simple/field-components/specific-field/geospatial/geospatial-item-page-field.component.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
import { NgIf } from '@angular/common';
21
import {
32
Component,
43
Input,
54
OnInit,
65
} from '@angular/core';
7-
import { TranslateModule } from '@ngx-translate/core';
6+
import { TranslatePipe } from '@ngx-translate/core';
87

98
import { Item } from '../../../../../core/shared/item.model';
109
import {
@@ -21,8 +20,7 @@ import { ItemPageFieldComponent } from '../item-page-field.component';
2120
imports: [
2221
GeospatialMapComponent,
2322
MetadataFieldWrapperComponent,
24-
NgIf,
25-
TranslateModule,
23+
TranslatePipe,
2624
],
2725
standalone: true,
2826
})

src/app/request-copy/grant-request-copy/grant-request-copy.component.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
import {
2-
AsyncPipe,
3-
CommonModule,
4-
} from '@angular/common';
1+
import { AsyncPipe } from '@angular/common';
52
import {
63
Component,
74
OnInit,
@@ -49,7 +46,6 @@ import { ThemedEmailRequestCopyComponent } from '../email-request-copy/themed-em
4946
standalone: true,
5047
imports: [
5148
AsyncPipe,
52-
CommonModule,
5349
FormsModule,
5450
RouterLink,
5551
ThemedEmailRequestCopyComponent,

src/app/shared/object-geospatial-map/object-geospatial-map.component.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
import {
2-
isPlatformBrowser,
3-
NgIf,
4-
} from '@angular/common';
1+
import { isPlatformBrowser } from '@angular/common';
52
import {
63
ChangeDetectionStrategy,
74
Component,
@@ -35,7 +32,6 @@ import { parseGeoJsonFromMetadataValue } from '../utils/geospatial.functions';
3532
standalone: true,
3633
imports: [
3734
GeospatialMapComponent,
38-
NgIf,
3935
],
4036
})
4137

src/app/submission/form/footer/submission-form-footer.component.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
import { CommonModule } from '@angular/common';
1+
import { AsyncPipe } from '@angular/common';
22
import {
33
Component,
44
Input,
55
OnChanges,
66
SimpleChanges,
77
} from '@angular/core';
88
import { NgbModal } from '@ng-bootstrap/ng-bootstrap';
9-
import { TranslateModule } from '@ngx-translate/core';
9+
import { TranslatePipe } from '@ngx-translate/core';
1010
import {
1111
Observable,
1212
of,
@@ -29,10 +29,10 @@ import { SubmissionService } from '../../submission.service';
2929
templateUrl: './submission-form-footer.component.html',
3030
standalone: true,
3131
imports: [
32+
AsyncPipe,
3233
BrowserOnlyPipe,
3334
BtnDisabledDirective,
34-
CommonModule,
35-
TranslateModule,
35+
TranslatePipe,
3636
],
3737
})
3838
export class SubmissionFormFooterComponent implements OnChanges {
Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,29 @@
11
<div class="thumbnail" [class.limit-width]="limitWidth">
22
@if (isLoading()) {
3-
<div class="thumbnail-content outer">
4-
<div class="inner">
5-
<div class="centered">
6-
<ds-loading [spinner]="true"></ds-loading>
3+
<div class="thumbnail-content outer">
4+
<div class="inner">
5+
<div class="centered">
6+
<ds-loading [spinner]="true"></ds-loading>
7+
</div>
78
</div>
89
</div>
9-
</div>
1010
}
1111
<!-- don't use *ngIf="!isLoading" so the thumbnail can load in while the animation is playing -->
1212
@if (src() !== null) {
13-
<img
14-
class="thumbnail-content img-fluid"
15-
[ngClass]="{ 'd-none': isLoading ()}"
13+
<img class="thumbnail-content img-fluid"
14+
[class.d-none]="isLoading"
1615
[src]="src() | dsSafeUrl"
1716
[alt]="alt | translate"
1817
(error)="errorHandler()"
19-
(load)="successHandler()"
20-
/>
21-
} @if (src() === null && isLoading() === false) {
22-
<div class="thumbnail-content outer">
23-
<div class="inner">
24-
<div class="thumbnail-placeholder centered">
25-
{{ placeholder | translate }}
18+
(load)="successHandler()"/>
19+
}
20+
@if (src() === null && isLoading() === false) {
21+
<div class="thumbnail-content outer">
22+
<div class="inner">
23+
<div class="thumbnail-placeholder centered">
24+
{{ placeholder | translate }}
25+
</div>
2626
</div>
2727
</div>
28-
</div>
2928
}
3029
</div>

src/app/thumbnail/thumbnail.component.ts

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
import {
2-
CommonModule,
3-
isPlatformBrowser,
4-
} from '@angular/common';
1+
import { isPlatformBrowser } from '@angular/common';
52
import {
63
Component,
74
Inject,
@@ -12,7 +9,7 @@ import {
129
SimpleChanges,
1310
WritableSignal,
1411
} from '@angular/core';
15-
import { TranslateModule } from '@ngx-translate/core';
12+
import { TranslatePipe } from '@ngx-translate/core';
1613
import { of } from 'rxjs';
1714
import { switchMap } from 'rxjs/operators';
1815

@@ -40,10 +37,9 @@ import { SafeUrlPipe } from '../shared/utils/safe-url-pipe';
4037
templateUrl: './thumbnail.component.html',
4138
standalone: true,
4239
imports: [
43-
CommonModule,
4440
SafeUrlPipe,
4541
ThemedLoadingComponent,
46-
TranslateModule,
42+
TranslatePipe,
4743
],
4844
})
4945
export class ThumbnailComponent implements OnChanges {

0 commit comments

Comments
 (0)