Permalink
Browse files

Step 1.13: Add Ionic to application basis

  • Loading branch information...
DAB0mB committed Feb 6, 2017
1 parent 46e08fa commit 5d62b36ef2ae72f3bf2ed3bda93acce38d504041
Showing with 25 additions and 4 deletions.
  1. +14 −2 client/imports/app/app.component.ts
  2. +6 −1 client/imports/app/app.module.ts
  3. +5 −1 client/main.html
@@ -1,8 +1,20 @@
import { Component } from '@angular/core';
import { Platform } from 'ionic-angular';
import { StatusBar, Splashscreen } from 'ionic-native';
import template from "./app.html";
@Component({
selector: 'my-app',
template
})
export class MyApp {}
export class MyApp {
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.
if (platform.is('cordova')) {
StatusBar.styleDefault();
Splashscreen.hide();
}
});
}
}
@@ -1,15 +1,20 @@
import { NgModule, ErrorHandler } from '@angular/core';
import { IonicApp, IonicModule, IonicErrorHandler } from 'ionic-angular';
import { MyApp } from './app.component';
@NgModule({
declarations: [
MyApp
],
imports: [
IonicModule.forRoot(MyApp),
],
bootstrap: [IonicApp],
entryComponents: [
MyApp
],
providers: [
{ provide: ErrorHandler }
{ provide: ErrorHandler, useClass: IonicErrorHandler }
]
})
export class AppModule {}
View
@@ -1,7 +1,11 @@
<head>
<title>Ionic2-MeteorCLI-WhatsApp</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
<meta name="format-detection" content="telephone=no">
<meta name="msapplication-tap-highlight" content="no">
<meta name="theme-color" content="#4e8ef7">
</head>
<body>
<my-app></my-app>
<ion-app></ion-app>
</body>

0 comments on commit 5d62b36

Please sign in to comment.