Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/angular/your-first-app/7-live-reload.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ The Live Reload server will start up, and the native IDE of choice will open if

## Deleting Photos

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.
With Live Reload running and the app open on your device, let’s implement photo deletion functionality. In your code editor (not Android Studio or Xcode), 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.

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

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

await Filesystem.deleteFile({
path: filename,
Expand Down
4 changes: 2 additions & 2 deletions docs/react/your-first-app/7-live-reload.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ The Live Reload server will start up, and the native IDE of choice will open if

## Deleting Photos

With Live Reload running and the app is open on your device, let’s implement photo deletion functionality. Open `Tab2.tsx` then import `useState` from React and `UserPhoto` from the `usePhotoGallery` hook:
With Live Reload running and the app open on your device, let’s implement photo deletion functionality. In your code editor (not Android Studio or Xcode), open `Tab2.tsx` then import `useState` from React and `UserPhoto` from the `usePhotoGallery` hook:

```tsx
import React, { useState } from 'react';
Expand Down Expand Up @@ -94,7 +94,7 @@ const deletePhoto = async (photo: UserPhoto) => {
Preferences.set({ key: PHOTO_STORAGE, value: JSON.stringify(newPhotos) });

// delete photo file from filesystem
const filename = photo.filepath.substr(photo.filepath.lastIndexOf('/') + 1);
const filename = photo.filepath.substring(photo.filepath.lastIndexOf('/') + 1);
await Filesystem.deleteFile({
path: filename,
directory: Directory.Data,
Expand Down
4 changes: 2 additions & 2 deletions docs/vue/your-first-app/7-live-reload.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ The Live Reload server will start up, and the native IDE of choice will open if

## Deleting Photos

With Live Reload running and the app is open on your device, let’s implement photo deletion functionality. Open `Tab2Page.vue` then import the `actionSheetController`. We'll display an [IonActionSheet](https://ionicframework.com/docs/api/action-sheet) with the option to delete a photo:
With Live Reload running and the app open on your device, let’s implement photo deletion functionality. In your code editor (not Android Studio or Xcode), open `Tab2Page.vue` then import the `actionSheetController`. We'll display an [IonActionSheet](https://ionicframework.com/docs/api/action-sheet) with the option to delete a photo:

```tsx
import {
Expand Down Expand Up @@ -96,7 +96,7 @@ const deletePhoto = async (photo: UserPhoto) => {
photos.value = photos.value.filter((p) => p.filepath !== photo.filepath);

// delete photo file from filesystem
const filename = photo.filepath.substr(photo.filepath.lastIndexOf('/') + 1);
const filename = photo.filepath.substring(photo.filepath.lastIndexOf('/') + 1);
await Filesystem.deleteFile({
path: filename,
directory: Directory.Data,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ The Live Reload server will start up, and the native IDE of choice will open if

## Deleting Photos

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.
With Live Reload running and the app open on your device, let’s implement photo deletion functionality. In your code editor (not Android Studio or Xcode), 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.

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

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

await Filesystem.deleteFile({
path: filename,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ The Live Reload server will start up, and the native IDE of choice will open if

## Deleting Photos

With Live Reload running and the app is open on your device, let’s implement photo deletion functionality. Open `Tab2.tsx` then import `useState` from React and `UserPhoto` from the `usePhotoGallery` hook:
With Live Reload running and the app open on your device, let’s implement photo deletion functionality. In your code editor (not Android Studio or Xcode), open `Tab2.tsx` then import `useState` from React and `UserPhoto` from the `usePhotoGallery` hook:

```tsx
import React, { useState } from 'react';
Expand Down Expand Up @@ -94,7 +94,7 @@ const deletePhoto = async (photo: UserPhoto) => {
Preferences.set({ key: PHOTO_STORAGE, value: JSON.stringify(newPhotos) });

// delete photo file from filesystem
const filename = photo.filepath.substr(photo.filepath.lastIndexOf('/') + 1);
const filename = photo.filepath.substring(photo.filepath.lastIndexOf('/') + 1);
await Filesystem.deleteFile({
path: filename,
directory: Directory.Data,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ The Live Reload server will start up, and the native IDE of choice will open if

## Deleting Photos

With Live Reload running and the app is open on your device, let’s implement photo deletion functionality. Open `Tab2.vue` then import the `actionSheetController`. We'll display an [IonActionSheet](https://ionicframework.com/docs/api/action-sheet) with the option to delete a photo:
With Live Reload running and the app open on your device, let’s implement photo deletion functionality. In your code editor (not Android Studio or Xcode), open `Tab2.vue` then import the `actionSheetController`. We'll display an [IonActionSheet](https://ionicframework.com/docs/api/action-sheet) with the option to delete a photo:

```tsx
import {
Expand Down Expand Up @@ -111,7 +111,7 @@ const deletePhoto = async (photo: UserPhoto) => {
photos.value = photos.value.filter((p) => p.filepath !== photo.filepath);

// delete photo file from filesystem
const filename = photo.filepath.substr(photo.filepath.lastIndexOf('/') + 1);
const filename = photo.filepath.substring(photo.filepath.lastIndexOf('/') + 1);
await Filesystem.deleteFile({
path: filename,
directory: Directory.Data,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ The Live Reload server will start up, and the native IDE of choice will open if

## Deleting Photos

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.
With Live Reload running and the app open on your device, let’s implement photo deletion functionality. In your code editor (not Android Studio or Xcode), 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.

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

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

await Filesystem.deleteFile({
path: filename,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ The Live Reload server will start up, and the native IDE of choice will open if

## Deleting Photos

With Live Reload running and the app is open on your device, let’s implement photo deletion functionality. Open `Tab2.tsx` then import `useState` from React and `UserPhoto` from the `usePhotoGallery` hook:
With Live Reload running and the app open on your device, let’s implement photo deletion functionality. In your code editor (not Android Studio or Xcode), open `Tab2.tsx` then import `useState` from React and `UserPhoto` from the `usePhotoGallery` hook:

```tsx
import React, { useState } from 'react';
Expand Down Expand Up @@ -94,7 +94,7 @@ const deletePhoto = async (photo: UserPhoto) => {
Preferences.set({ key: PHOTO_STORAGE, value: JSON.stringify(newPhotos) });

// delete photo file from filesystem
const filename = photo.filepath.substr(photo.filepath.lastIndexOf('/') + 1);
const filename = photo.filepath.substring(photo.filepath.lastIndexOf('/') + 1);
await Filesystem.deleteFile({
path: filename,
directory: Directory.Data,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ The Live Reload server will start up, and the native IDE of choice will open if

## Deleting Photos

With Live Reload running and the app is open on your device, let’s implement photo deletion functionality. Open `Tab2.vue` then import the `actionSheetController`. We'll display an [IonActionSheet](https://ionicframework.com/docs/api/action-sheet) with the option to delete a photo:
With Live Reload running and the app open on your device, let’s implement photo deletion functionality. In your code editor (not Android Studio or Xcode), open `Tab2.vue` then import the `actionSheetController`. We'll display an [IonActionSheet](https://ionicframework.com/docs/api/action-sheet) with the option to delete a photo:

```tsx
import {
Expand Down Expand Up @@ -111,7 +111,7 @@ const deletePhoto = async (photo: UserPhoto) => {
photos.value = photos.value.filter((p) => p.filepath !== photo.filepath);

// delete photo file from filesystem
const filename = photo.filepath.substr(photo.filepath.lastIndexOf('/') + 1);
const filename = photo.filepath.substring(photo.filepath.lastIndexOf('/') + 1);
await Filesystem.deleteFile({
path: filename,
directory: Directory.Data,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ The Live Reload server will start up, and the native IDE of choice will open if

## Deleting Photos

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.
With Live Reload running and the app open on your device, let’s implement photo deletion functionality. In your code editor (not Android Studio or Xcode), 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.

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

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

await Filesystem.deleteFile({
path: filename,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ The Live Reload server will start up, and the native IDE of choice will open if

## Deleting Photos

With Live Reload running and the app is open on your device, let’s implement photo deletion functionality. Open `Tab2.tsx` then import `useState` from React and `UserPhoto` from the `usePhotoGallery` hook:
With Live Reload running and the app open on your device, let’s implement photo deletion functionality. In your code editor (not Android Studio or Xcode), open `Tab2.tsx` then import `useState` from React and `UserPhoto` from the `usePhotoGallery` hook:

```tsx
import React, { useState } from 'react';
Expand Down Expand Up @@ -94,7 +94,7 @@ const deletePhoto = async (photo: UserPhoto) => {
Preferences.set({ key: PHOTO_STORAGE, value: JSON.stringify(newPhotos) });

// delete photo file from filesystem
const filename = photo.filepath.substr(photo.filepath.lastIndexOf('/') + 1);
const filename = photo.filepath.substring(photo.filepath.lastIndexOf('/') + 1);
await Filesystem.deleteFile({
path: filename,
directory: Directory.Data,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ The Live Reload server will start up, and the native IDE of choice will open if

## Deleting Photos

With Live Reload running and the app is open on your device, let’s implement photo deletion functionality. Open `Tab2Page.vue` then import the `actionSheetController`. We'll display an [IonActionSheet](https://ionicframework.com/docs/api/action-sheet) with the option to delete a photo:
With Live Reload running and the app open on your device, let’s implement photo deletion functionality. In your code editor (not Android Studio or Xcode), open `Tab2Page.vue` then import the `actionSheetController`. We'll display an [IonActionSheet](https://ionicframework.com/docs/api/action-sheet) with the option to delete a photo:

```tsx
import {
Expand Down Expand Up @@ -96,7 +96,7 @@ const deletePhoto = async (photo: UserPhoto) => {
photos.value = photos.value.filter((p) => p.filepath !== photo.filepath);

// delete photo file from filesystem
const filename = photo.filepath.substr(photo.filepath.lastIndexOf('/') + 1);
const filename = photo.filepath.substring(photo.filepath.lastIndexOf('/') + 1);
await Filesystem.deleteFile({
path: filename,
directory: Directory.Data,
Expand Down