Skip to content

Instantly share code, notes, and snippets.

@klebercode
Forked from EvanWillms/app.ts
Created February 22, 2018 18:15
Show Gist options
  • Select an option

  • Save klebercode/5ec6ecefa93909e7a99d233f36bbb08c to your computer and use it in GitHub Desktop.

Select an option

Save klebercode/5ec6ecefa93909e7a99d233f36bbb08c to your computer and use it in GitHub Desktop.

Revisions

  1. @EvanWillms EvanWillms created this gist Apr 10, 2016.
    33 changes: 33 additions & 0 deletions app.ts
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,33 @@
    // Minimum viable app.ts pulled from https://github.com/driftyco/ionic2-starter-blank/tree/41b4da8329636a95ab05d2579efd3a1527d2e830
    // This snapshot is likely [email protected] compatable

    import 'es6-shim';
    import {App, Platform} from 'ionic-angular';
    import {StatusBar} from 'ionic-native';
    import {HomePage} from './pages/home/home';

    @App({
    template: '<ion-nav [root]="rootPage"></ion-nav>',
    config: {
    // These options are available in [email protected] and up.
    scrollAssist: false, // Valid options appear to be [true, false]
    autoFocusAssist: false // Valid options appear to be ['instant', 'delay', false]
    } // http://ionicframework.com/docs/v2/api/config/Config/
    })
    export class MyApp {
    rootPage: any = HomePage;

    constructor(platform: Platform) {
    platform.ready().then(() => {
    // Okay, so the platform is ready and our plugins are available.
    // Here you can do any higher level native things you might need.
    StatusBar.styleDefault();

    if (window.cordova && window.cordova.plugins.Keyboard) {
    // This requires installation of https://github.com/driftyco/ionic-plugin-keyboard
    // and can only affect native compiled Ionic2 apps (not webserved).
    cordova.plugins.Keyboard.disableScroll(true);
    }
    });
    }
    }