# Ionic 2 project adapt to Ionic 1

**URL:** <https://forum.ionicframework.com/t/ionic-2-project-adapt-to-ionic-1/106005>\
**Category:** ionic-v3\
**Created:** [September 20, 2017, 3:30am UTC](https://forum.ionicframework.com/t/ionic-2-project-adapt-to-ionic-1/106005 "2017-09-20T03:30:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![tiagozonta](https://avatars.discourse-cdn.com/v4/letter/t/d78d45/32.png) [@tiagozonta](https://forum.ionicframework.com/u/tiagozonta)\
**Post date:** [September 20, 2017, 3:30am UTC](https://forum.ionicframework.com/t/ionic-2-project-adapt-to-ionic-1/106005/1 "2017-09-20T03:30:31Z")

</div>

Hi. It’s possible adapt this Ionic 2 project to Ionic 1, or something similar, and instead of using ionic native camera, use ngCordova camera? I’m trying to implement this code on my camera page. I researched several sources, but I did not find anything similar for Ionic 1. What’s the best way to do this?

This is my **page.ts**

```auto
import {Component} from '@angular/core';
import {NavController, AlertController} from 'ionic-angular';
import {Camera, CameraOptions} from '@ionic-native/camera';

@Component({
  selector: 'page-home',
  templateUrl: 'home.html'
})
export class HomePage {

  public photos : any;
  public base64Image : string;
  constructor(public navCtrl : NavController, private camera : Camera, private alertCtrl : AlertController) {}

  ngOnInit() {
    this.photos = [];
  }

  deletePhoto(index) {
    let confirm = this
      .alertCtrl
      .create({
        title: 'Sure you want to delete this photo? There is NO undo!',
        message: '',
        buttons: [
          {
            text: 'No',
            handler: () => {
              console.log('Disagree clicked');
            }
          }, {
            text: 'Yes',
            handler: () => {
              console.log('Agree clicked');
              this
                .photos
                .splice(index, 1);
              //return true;
            }
          }
        ]
      });
    confirm.present();
  }

  takePhoto() {
    const options : CameraOptions = {
      quality: 50,
      destinationType: this.camera.DestinationType.FILE_URI,
      encodingType: this.camera.EncodingType.JPEG,
      mediaType: this.camera.MediaType.PICTURE
    }
    this
      .camera
      .getPicture(options)
      .then((imageData) => {
        this.base64Image = "file://" + imageData;
        this
          .photos
          .push(this.base64Image);
        this
          .photos
          .reverse();
      }, (err) => {
        console.log(err);
      });
  }

}

```

and this is my **page.html**

```auto
<ion-content padding class="card-background-page">
  <button ion-button full (click)='takePhoto()'><ion-icon name="camera"></ion-icon></button>

  <ion-grid>
    <ion-row>
      <ion-col col-6 *ngFor="let photo of photos; let id = index">
        <ion-card class="releative">
          
          <ion-icon ios="ios-add-circle" md="md-add-circle"class="deleteIcon" (click)="deletePhoto(id)"></ion-icon>
         <img [src]="photo" *ngIf="photo" />
        </ion-card>
      </ion-col>
    </ion-row>
  </ion-grid>
</ion-content>

```

Thank you if you help me!

---

<div class="post-metadata">

**Author:** ![rapropos](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/rapropos/32/100227_2.png) [@rapropos](https://forum.ionicframework.com/u/rapropos)\
**Post date:** [September 20, 2017, 3:32am UTC](https://forum.ionicframework.com/t/ionic-2-project-adapt-to-ionic-1/106005/2 "2017-09-20T03:32:26Z")

</div>

> [@tiagozonta](#):
>
> It’s possible adapt this Ionic 2 project to Ionic 1

No. The two frameworks are completely incompatible.

---

<div class="post-metadata">

**Author:** ![tiagozonta](https://avatars.discourse-cdn.com/v4/letter/t/d78d45/32.png) [@tiagozonta](https://forum.ionicframework.com/u/tiagozonta)\
**Post date:** [September 20, 2017, 3:35am UTC](https://forum.ionicframework.com/t/ionic-2-project-adapt-to-ionic-1/106005/3 "2017-09-20T03:35:49Z")

</div>

OK. thanks for helping
