Skip to main content

Posts

Play youtube video in Ionic Framework App

We can add YouTube videos in our simple ionic app by creating simple directive in angularjs and pass the youtube video id. I have refer multiple sites and solutions and after that create one directive and use it in my app to embed youtube video in ionic app. 1.Create the project ionic start Test blank cd Test ionic platform add android 2.Implementation Here is how most people add a YouTube player to their hybrid app : <iframe src="https://www.youtube.com/embed/KBKXu3Kg4yg?rel=0" frameborder="0" allowfullscreen> </iframe> This is simple way but here we ar not handle some events with youtube video and it's may be complicated for us.For that we creating directive and use it our view. First head out to google development docs and look up the programmatic way of embedding YouTube using javascript. Following code shows the code in our directives.js file angular.module('starter.dirctives', []) .directive(...

File Upload & Download With ng-cordova File Transfer Plugin In Ionic Framework

Using the AngularJS extension set , ngCordova , with Ionic Framework and the Apache Cordova File Transfer plugin, you can easily upload files to a remote server and download files from a remote server. 1.Create the project ionic start Test blank cd Test ionic platform add android 2.Add Plugin org.apache.cordova.file-transfer https://github.com/apache/cordova-plugin-file-transfer This plugin allows you to upload and download files. This plugin defines global FileTransfer, FileUploadOptions Constructors. Although in the global scope, they are not available until after the deviceready event . Installation cordova plugin add cordova plugin add cordova-plugin-file-transfer     2.    org.apache.cordova.file             https://github.com/apache/cordova-plugin-file             This plugin implements a Fi...