Skip to content

Commit c3ba6db

Browse files
committed
chore(package): update ionic-angular cli plugin to 1.3.0
1 parent b23e18b commit c3ba6db

File tree

2 files changed

+48
-48
lines changed

2 files changed

+48
-48
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
},
3939
"devDependencies": {
4040
"@ionic/app-scripts": "1.3.7",
41-
"@ionic/cli-plugin-ionic-angular": "1.2.0",
41+
"@ionic/cli-plugin-ionic-angular": "1.3.0",
4242
"typescript": "~2.3.3"
4343
},
4444
"cordovaPlugins": [

src/pages/ionic-native/get-image/get-image.ts

Lines changed: 47 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -16,52 +16,52 @@ export class GetImagePage {
1616
}
1717

1818
changePicture() {
19-
// let loading = this.loadingCtrl.create();
20-
//
21-
// let actionSheet = this.actionsheetCtrl.create({
22-
// title: 'Upload picture',
23-
// cssClass: 'action-sheets-basic-page',
24-
// buttons: [
25-
// {
26-
// text: 'Camera',
27-
// icon: !this.platform.is('ios') ? 'camera' : null,
28-
// handler: () => {
29-
// loading.present();
30-
// return this.cameraProvider.getPictureFromCamera().then(picture => {
31-
// if (picture) {
32-
// this.chosenPicture = picture;
33-
// }
34-
// loading.dismiss();
35-
// }, error => {
36-
// alert(error);
37-
// });
38-
// }
39-
// },
40-
// {
41-
// text: !this.platform.is('ios') ? 'Gallery' : 'Camera Roll',
42-
// icon: !this.platform.is('ios') ? 'image' : null,
43-
// handler: () => {
44-
// loading.present();
45-
// return this.cameraProvider.getPictureFromPhotoLibrary().then(picture => {
46-
// if (picture) {
47-
// this.chosenPicture = picture;
48-
// }
49-
// loading.dismiss();
50-
// }, error => {
51-
// alert(error);
52-
// });
53-
// }
54-
// },
55-
// {
56-
// text: 'Cancel',
57-
// icon: !this.platform.is('ios') ? 'close' : null,
58-
// role: 'destructive',
59-
// handler: () => {
60-
// console.log('The user has cancelled the interaction.');
61-
// }
62-
// }
63-
// ]
64-
// });
65-
// return actionSheet.present();
19+
let loading = this.loadingCtrl.create();
20+
21+
let actionSheet = this.actionsheetCtrl.create({
22+
title: 'Upload picture',
23+
cssClass: 'action-sheets-basic-page',
24+
buttons: [
25+
{
26+
text: 'Camera',
27+
icon: !this.platform.is('ios') ? 'camera' : null,
28+
handler: () => {
29+
loading.present();
30+
return this.cameraProvider.getPictureFromCamera().then(picture => {
31+
if (picture) {
32+
this.chosenPicture = picture;
33+
}
34+
loading.dismiss();
35+
}, error => {
36+
alert(error);
37+
});
38+
}
39+
},
40+
{
41+
text: !this.platform.is('ios') ? 'Gallery' : 'Camera Roll',
42+
icon: !this.platform.is('ios') ? 'image' : null,
43+
handler: () => {
44+
loading.present();
45+
return this.cameraProvider.getPictureFromPhotoLibrary().then(picture => {
46+
if (picture) {
47+
this.chosenPicture = picture;
48+
}
49+
loading.dismiss();
50+
}, error => {
51+
alert(error);
52+
});
53+
}
54+
},
55+
{
56+
text: 'Cancel',
57+
icon: !this.platform.is('ios') ? 'close' : null,
58+
role: 'destructive',
59+
handler: () => {
60+
console.log('The user has cancelled the interaction.');
61+
}
62+
}
63+
]
64+
});
65+
return actionSheet.present();
6666
}
6767
}

0 commit comments

Comments
 (0)