Skip to content

Commit 2840d1f

Browse files
committed
docs(angular):changed component photo service (ionic-team#2986)
changed photo.path --> photo.path!
1 parent 623e390 commit 2840d1f

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

docs/angular/your-first-app/5-adding-mobile.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,11 @@ First, we’ll update the photo saving functionality to support mobile. In the `
3535
```tsx
3636
private async readAsBase64(photo: Photo) {
3737
// "hybrid" will detect Cordova or Capacitor
38-
const fileName = new Date().getTime() + '.jpeg';
3938

4039
if (this.platform.is('hybrid')) {
4140
// Read the file into base64 format
4241
const file = await Filesystem.readFile({
43-
path: fileName
42+
path: photo.path!
4443
});
4544

4645
return file.data;

0 commit comments

Comments
 (0)