Meteor.startup(function() {
     // define array of bootstrap providers
     var providers = ionicProviders(args.providers).concat(args.providers || [], METEOR_PROVIDERS);
     // auto add Ionic directives
     let directives = args.directives ? args.directives.concat(IONIC_DIRECTIVES) : IONIC_DIRECTIVES;
     // automatically provide all of Ionic's directives to every component
     providers.push(provide(PLATFORM_DIRECTIVES, { useValue: [directives], multi: true }));
     if (args.prodMode) {
         enableProdMode();
     }
     ionicBootstrap(cls, providers, args.config);
     return cls;
 });
Ejemplo n.º 2
0
Archivo: app.ts Proyecto: tejit2004/app
            }
            else if(type == 'logout')
            {
              localStorage.removeItem('username');
              localStorage.removeItem('password');
              localStorage.removeItem('MPin');
              this.nav.setRoot(LoginPage);
            }
          }
        },
        {
          text:'No',
          handler : () => {alert.dismiss(); this.dialogOpened = false;}
        }
      ]
    });

    alert.present();
  }
}

ionicBootstrap(MyApp, [CommonService], {
  //tabbarPlacement: 'bottom'
  // Below code is for ionic View only, In Real devices it works perfectly.
  platforms: {
      ios: {
        statusbarPadding: true
      }
    }
});
Ejemplo n.º 3
0
            // stop scanning
            self.centralBle.stop();
        });

        // write event
        this.events.subscribe('central:write', (eventData) => {
            console.log('event: write', eventData[0]);
            self.centralBle.write(JSON.stringify(eventData[0]));
        });
    }

    /**
     * Buyer event listeners
     */
    buyerEvents() {
        // initialize the peripheral ble
        this.peripheralBle.init();

        this.events.subscribe('peripheral:stop', (eventData) => {
            this.peripheralBle.stop();
        });

        // do some cleanup by removing the looking for product data
        this.localStorage.removeFromLocal('looking_for');
    }
}

ionicBootstrap(MyApp, [
    provide('CouchDBEndpoint', {useValue: 'http://192.168.0.109:5984/'}),
    provide('APIEndpoint', {useValue: 'http://192.168.0.124/'})])
Ejemplo n.º 4
0
  constructor(platform:Platform) {
    this.rootPage = TabsPage;
    this.initializeApp(platform);
  }

  private initializeApp(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.
      this.hideSplashScreen();
      StatusBar.styleDefault();
      StatusBar.backgroundColorByHexString("#5e6772");
    });
  }
  hideSplashScreen() {
    if(navigator && navigator.splashscreen) {
      setTimeout(()=> {
        navigator.splashscreen.hide();
      }, 1000);
    }
  }
}

ionicBootstrap(MyApp, null, {
  tabbarPlacement: 'bottom',
  backButtonText: '',
  modalEnter: 'modal-slide-in',
  modalLeave: 'modal-slide-out'
});
Ejemplo n.º 5
0
})
export class JerryApp implements OnInit{

  private rootPage:any;

  public authUser:any;
  public isAuthUser:boolean;

  constructor(
    private platform:Platform,
    private modal: ModalController
    ) {

    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();
      console.info('Platform Ready', platform);
      this.rootPage = DashboardComponent;
    });
  }

  ngOnInit(){

  }


}

ionicBootstrap(JerryApp, [Geyser, ParticleService]);
Ejemplo n.º 6
0
      this.locationService.refreshCurrentLocation();

      this.events.subscribe("loginSuccess", () => {
        this.rootPage = TabsPage;
      });

      // Check if existing user
      this.db.get("account").then(data => {
        if (data !== undefined) {

          //TODO Implement offline mode if there is no network connection
          this.accountService.tokenLogin(JSON.parse(data));

        } else {
          // Display intro page for new users w/c allows them to register/login
          this.rootPage = IntroPage;
        }
      },
        error => {
          console.log("DB Failure");
        }
      );
  }
}


if (!app_config.is_debug)
  enableProdMode();

ionicBootstrap(Blottr)
Ejemplo n.º 7
0
      authDomain: "gadash-nirim.firebaseapp.com",
      databaseURL: "https://gadash-nirim.firebaseio.com",
      storageBucket: "gadash-nirim.appspot.com",
    };

    firebase.initializeApp(FbConfig);
    this.rootPage = LoginPage;
    firebase.auth().onAuthStateChanged((user) => {
      if (user) {
        // If there's a user take him to the home page.
        this.rootPage = HomePage;
      } else {
        // If there's no user logged in send him to the LoginPage
        this.rootPage = LoginPage;
      }
    });


    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();

    });
  }
}

ionicBootstrap(MyApp, [
  provideStore({ entries })
]);
Ejemplo n.º 8
0
import {StatusBar} from 'ionic-native';
import {TabsPage} from './pages/tabs/tabs';


@Component({
  template: '<ion-nav [root]="rootPage"></ion-nav>'
})
export class MyApp {

  private rootPage: any;

  constructor(private platform: Platform) {
    this.rootPage = TabsPage;

    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();
    });
  }
}

//ionicBootstrap(MyApp);
ionicBootstrap(MyApp, null, {
  platforms: {
    ios: {
      statusBarPadding: true
    }
  }
});
Ejemplo n.º 9
0
})
export class MyApp {

    private rootPage: any;

    constructor(
        platform: Platform,
        recipeService : RecipeService,
        ingredientService : IngredientService,
        utilService: UtilService) {
        this.rootPage = TabsPage;

        platform.ready().then(() => {

            recipeService.initDB();
            ingredientService.initDB();
            utilService.updateView();

            // 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();
    });
    }
}

ionicBootstrap(MyApp, [
    disableDeprecatedForms(), provideForms(),
    RecipeService, IngredientService, UtilService,
    HTTP_PROVIDERS
]);
Ejemplo n.º 10
0
import {TabsPage} from './pages/tabs/tabs';


@Component({
  template: '<ion-nav [root]="rootPage"></ion-nav>'
})
export class MyApp {

  private rootPage: any;

  constructor(private platform: Platform) {
    this.rootPage = TabsPage;
    this.platform = platform;

    this.initializeApp();

  }
  
  initializeApp(){
    this.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();
      //console.log(this.platform.platforms());
    });

  }
}

ionicBootstrap(MyApp,[JSONP_PROVIDERS]);