Skip to content

Commit 07e95ad

Browse files
authored
Update instructions for photo deletion functionality
fixed deprecated substr => substring. otherwise it did not work. Also specified which IDE you make changes
1 parent 29132d1 commit 07e95ad

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/angular/your-first-app/7-live-reload.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ The Live Reload server will start up, and the native IDE of choice will open if
3232

3333
## Deleting Photos
3434

35-
With Live Reload running and the app open on your device, let’s implement photo deletion functionality. Open `tab2.page.html` and add a new click handler to each `<ion-img>` element. When the app user taps on a photo in our gallery, we’ll display an [Action Sheet](https://ionicframework.com/docs/api/action-sheet) dialog with the option to either delete the selected photo or cancel (close) the dialog.
35+
With Live Reload running and the app open on your device, let’s implement photo deletion functionality. In your IDE, NOT Android or IOS IDE, open `tab2.page.html` and add a new click handler to each `<ion-img>` element. When the app user taps on a photo in our gallery, we’ll display an [Action Sheet](https://ionicframework.com/docs/api/action-sheet) dialog with the option to either delete the selected photo or cancel (close) the dialog.
3636

3737
```html
3838
<ion-col size="6" *ngFor="let photo of photoService.photos; index as position">
@@ -98,7 +98,7 @@ public async deletePicture(photo: UserPhoto, position: number) {
9898

9999
// delete photo file from filesystem
100100
const filename = photo.filepath
101-
.substr(photo.filepath.lastIndexOf('/') + 1);
101+
.substring(photo.filepath.lastIndexOf('/') + 1);
102102

103103
await Filesystem.deleteFile({
104104
path: filename,

0 commit comments

Comments
 (0)