GithubHelp home page GithubHelp logo

ionic-showcase's Introduction

Showcase - a practical guide on how to do a side menu app using ionic 2

Components

Highlight menu item

Follow the tutorial here.

Prevent white screen after splash screen

Add the following line to your config.xml file:

<preference name="AutoHideSplashScreen" value="false" />

Image viewer

Follow the link here.

Basically, run the following command:

$ npm install --save ionic-img-viewer

Then, for ionic 2.x or up:

import { IonicImageViewerModule } from 'ionic-img-viewer';

@NgModule({
  imports: [
    IonicImageViewerModule
  ]
})
export class AppModule {}

To use:

<img src="IMAGE_URL" imageViewer />

In app browser

Follow the link in the doc.

To install:

$ ionic cordova plugin add cordova-plugin-inappbrowser
$ npm install --save @ionic-native/in-app-browser

To add the plugin to your app's module:

...

import { InAppBrowser } from '@ionic-native/in-app-browser';

...

@NgModule({
  ...

  providers: [
    ...
    InAppBrowser
    ...
  ]
  ...
})
export class AppModule { }

To use:

import { InAppBrowser } from '@ionic-native/in-app-browser';

export class ContactPage {

  constructor(public navCtrl: NavController,
    private iab: InAppBrowser) {
  }

  showFacebook() {
    const browser = this.iab.create("https://www.facebook.com/profile.php?id=100000519299083");
    browser.show();
  }
  
}

Tricks

Splash Screen Spinner

To control the appearnace of the splash screen spinner, add the following line to your config.xml file:

<preference name="ShowSplashScreenSpinner" value="false"/>

Change App name

Note that on iOS, you are not allowed to dynamically change the app name, you have to run the following command after you changed the app name in config.xml:

$ cordova plugin save
$ cordova platform rm ios
$ cordova platform add ios

ionic-showcase's People

Contributors

lxieyang avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.