Skip to main content

Posts

Showing posts with the label Ionic

Ionic2 - Hammer JS Example

Gesture event support is also one of the reason behind popularity of mobile applications. Capturing gesture events can be easily done in case of native mobile applications, since all the mobile platform expose gesture events in native code. Since Hybrid mobile applications are built over html and  javascript,  html don't support gesture events. There could be scenario's, where you wants to provide support for your hybrid mobile application. In such cases, we can use Hammer.JS  . Angular version 2 also provides support for Hammer.JS, about the same we will look into this post. Let's say we want to design a simple box, which we can rotate in any direction as shown Here we are trying to rotate the box in any direction by using Gesture events. To perform rotation we need to use two fingers. Let's see how we can implement the same in Ionic. Let's create a blank application using command ionic start hammerjsExample blank --v2 Now let's add Hammer.JS ...

Ionic2 - How to use D3 JS

Note: Purpose for this post is just to show, how to correctly use D3 JS in Ionic2 During the UI/Mobile app development, we all would have encountered need to use data visualization components. D3 JS is one of such powerful tool, being used for same. Using D3 in Ionic1 was pretty easy. Since Ionic2 has moved on typescript and node modules based development, developers has been facing difficulties about how to include any third party libraries. D3 is one of such libraries. Here in this post we will look how we can include D3 into our ionic2 application. Install Typings Typings is the simple way to manage and install TypeScript definitions. First we need to install typings, use given commnad in cmd/terminal: npm install -g typings Create Ionic2 blank application use the below command to create blank ionic application ionic start --v2 myApp blank this command will create an empty ionic2 project, which will contain two components app and home. app is your main comp...

Ionic2/Cordova - Android splash screen and icon is not working

an attractive icon and splash screen are always important for your mobile application. after all they are the first thing anyone will look into. But this has been always a great headache for the developers. Since they need to support multiple platforms and devices with different screen sizes. Each platform and device requires different size of icons and splash screen. We are lucky that Ionic team has taken care of this for us. We can read about all this from there documentation. Ionic Icon and Splash Screen Image Generation After the release of Cordova 6.0, icon and splash screen is not updating for android platform and it is showing default icon and splash screen. Actually there was an issue in Cordova 6.0 version, which is now fixed in latest Cordova android version.  Since Ionic2 is still referring to the old Cordova 6 version, this issue is occurring for all the new applications that are being created. There is a solution for the same which we will look here...

Ionic 2 - How to update existing Ionic2 Project version

Since the Ionic Team has launched the Ionic2, there has been great buzz about the same. All the mobile developer's are trying there hand on Ionic2.  With Each upgrade few new features and bug fixing were introduced. Now Finally Ionic Team has launched the Ionic2 Release Version . That's a great news, isn't it? But Now we all have one problem with us. How to update our existing Ionic2 Project's? We are going to look into the solution for the same. Update Ionic CLI Insert the command npm install -g ionic in command prompt and Enter Update Ionic Project Dependencies Open  package.json within your project folder and update the  dependencies as shown  "dependencies": { "@angular/common": "2.2.1", "@angular/compiler": "2.2.1", "@angular/compiler-cli": "2.2.1", "@angular/core": "2.2.1", "@angular/forms": "2.2.1", "@a...