December 21, 2018
  • All
  • Tutorials
  • Framework
  • V4

New Guide: Your First Ionic Framework V4 App

Matt Netkow

Following the exciting news that the Ionic Framework v4 release candidate has shipped, we’re releasing a new developer guide: Your First Ionic v4 App.

This guide walks you through the basics of Ionic Framework development in a fun and friendly manner. So, if you’re looking for an easy way to start building an Ionic app, this is a great place to begin. After completing all steps, you’ll have transformed the Tabs Angular starter app into an interactive photo gallery:

Along the way, you’ll be able to use Ionic DevApp to run your Ionic app directly on an iOS or Android device, seeing changes refresh immediately while writing code. After adding the Cordova Camera plugin, the app can take pictures using the device’s camera, and after adding the Ionic Storage plugin you’ll be able to save images to the device as well.

The best part? All of the camera functionality is possible via a cross-platform API. As you see below, there’s no iOS or Android-specific code!

Code

// open the device camera
this.camera.getPicture(options).then((imageData) => {
  // Add new photo to gallery
  this.photos.unshift({
    data: 'data:image/jpeg;base64,' + imageData
  });

  // Save all photos for later viewing
  this.storage.set('photos', this.photos);
}, (err) => {
  // Handle error
  console.log("Camera issue: " + err);
});

Ready to take Ionic Framework v4 for a spin?
View the rest of the guide here and start building!


Matt Netkow