Skip to content

Commit eab32c4

Browse files
committed
Enable AOT on build.
1 parent 495023c commit eab32c4

File tree

9 files changed

+25
-14
lines changed

9 files changed

+25
-14
lines changed

angular.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
"main": "src/main.ts",
2020
"polyfills": "src/polyfills.ts",
2121
"tsConfig": "tsconfig.app.json",
22+
"aot": true,
2223
"assets": [
2324
{
2425
"glob": "**/*",
@@ -56,7 +57,6 @@
5657
"outputHashing": "all",
5758
"sourceMap": false,
5859
"namedChunks": false,
59-
"aot": true,
6060
"extractLicenses": true,
6161
"vendorChunk": false,
6262
"buildOptimizer": true,

src/app/features/home/capture-tab/capture-details/sending-post-capture/sending-post-capture.page.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,10 @@
4343
<mat-card-header>
4444
<img [attr.src]="ownerAvatar$ | async" mat-card-avatar />
4545
<mat-card-title>
46-
{{ asset.source_transaction.sender }}
46+
{{ asset.source_transaction?.sender }}
4747
</mat-card-title>
4848
<mat-card-subtitle>
49-
{{ asset.source_transaction.fulfilled_at | date: 'short' }}
49+
{{ asset.source_transaction?.fulfilled_at | date: 'short' }}
5050
</mat-card-subtitle>
5151
</mat-card-header>
5252
<img [src]="asset.sharable_copy" mat-card-image />

src/app/features/home/capture-tab/capture-tab.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
</ng-template>
2020
<input
2121
#avatarInput
22-
(change)="uploadAvatar($event.target.files)"
22+
(change)="uploadAvatar($event)"
2323
type="file"
2424
accept="image/jpeg"
2525
class="avatar-input"

src/app/features/home/capture-tab/capture-tab.component.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,8 @@ export class CaptureTabComponent {
135135

136136
// eslint-disable-next-line class-methods-use-this
137137
keyDescendingOrder(
138-
a: KeyValue<number, string>,
139-
b: KeyValue<number, string>
138+
a: KeyValue<string, CaptureItem[]>,
139+
b: KeyValue<string, CaptureItem[]>
140140
): number {
141141
return a.key > b.key ? -1 : b.key > a.key ? 1 : 0;
142142
}
@@ -164,8 +164,8 @@ export class CaptureTabComponent {
164164
.subscribe();
165165
}
166166

167-
uploadAvatar(fileList: FileList) {
168-
return of(fileList.item(0))
167+
uploadAvatar(event: Event) {
168+
return of((event.target as HTMLInputElement | null)?.files?.item(0))
169169
.pipe(
170170
isNonNullable(),
171171
concatMap(picture =>

src/app/features/home/transaction/transaction-details/transaction-details.page.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ <h4 class="datetime">
1010
</h4>
1111
<mat-card class="transaction-card">
1212
<mat-card-content class="row">
13-
<mat-label> {{ (transaction$ | async)?.asset.id }}</mat-label>
13+
<mat-label> {{ (transaction$ | async)?.asset?.id }}</mat-label>
1414
<button [class]="status$ | async" mat-stroked-button disableRipple>
1515
{{ t('transactionState.' + (status$ | async)) }}
1616
</button>
1717
</mat-card-content>
18-
<img [src]="(transaction$ | async)?.asset.asset_file_thumbnail" />
18+
<img [src]="(transaction$ | async)?.asset?.asset_file_thumbnail" />
1919
<mat-card-content class="column">
2020
<mat-label>
2121
{{ t('sentFrom') }}: {{ (transaction$ | async)?.sender_name }}

src/app/features/login/login.page.html

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,12 @@
2424
{{ t('forgetPassword') }}
2525
</button>
2626

27-
<button routerLink="/signup" replaceUrl mat-stroked-button color="primary">
27+
<button
28+
routerLink="/signup"
29+
[replaceUrl]="true"
30+
mat-stroked-button
31+
color="primary"
32+
>
2833
{{ t('createAnAccount') }}
2934
</button>
3035

src/app/features/signup/signup.page.html

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,12 @@
1919
</button>
2020
</form>
2121

22-
<button routerLink="/login" replaceUrl mat-stroked-button color="primary">
22+
<button
23+
routerLink="/login"
24+
[replaceUrl]="true"
25+
mat-stroked-button
26+
color="primary"
27+
>
2328
{{ t('alreadyHaveAnAccount') }}
2429
</button>
2530
</div>

src/app/shared/core/image-viewer/image-viewer.page.spec.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
2+
import { PinchZoomModule } from 'ngx-pinch-zoom';
23
import { SharedTestingModule } from '../../shared-testing.module';
34
import { ImageViewerPage } from './image-viewer.page';
45

@@ -10,7 +11,7 @@ describe('ImageViewerPage', () => {
1011
waitForAsync(() => {
1112
TestBed.configureTestingModule({
1213
declarations: [ImageViewerPage],
13-
imports: [SharedTestingModule],
14+
imports: [SharedTestingModule, PinchZoomModule],
1415
}).compileComponents();
1516

1617
fixture = TestBed.createComponent(ImageViewerPage);

tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"allowSyntheticDefaultImports": true
1818
},
1919
"angularCompilerOptions": {
20-
"fullTemplateTypeCheck": true,
20+
"strictTemplates": true,
2121
"strictInjectionParameters": true
2222
}
2323
}

0 commit comments

Comments
 (0)