chore(): begin adding ionic components to mono-repo.

This commit is contained in:
Josh Thomas
2017-06-21 09:33:06 -05:00
parent 1181fe98fc
commit bd5b67304d
2159 changed files with 15687 additions and 147 deletions

View File

@ -0,0 +1,9 @@
import { Component } from '@angular/core';
import { PageOne } from '../pages/page-one/page-one';
@Component({
template: '<ion-nav [root]="root"></ion-nav>'
})
export class AppComponent {
root = PageOne;
}

View File

@ -0,0 +1,19 @@
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { IonicApp, IonicModule } from '../../../../src';
import { AppComponent } from './app.component';
import { PageOneModule } from '../pages/page-one/page-one.module';
@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule,
IonicModule.forRoot(AppComponent),
PageOneModule
],
bootstrap: [IonicApp]
})
export class AppModule {}

View File

@ -0,0 +1,5 @@
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { AppModule } from './app.module';
platformBrowserDynamic().bootstrapModule(AppModule);

View File

@ -0,0 +1,61 @@
<ion-header>
<ion-navbar>
<ion-title>ShowWhen</ion-title>
</ion-navbar>
</ion-header>
<ion-content class="show-when-demo">
<h5 margin>Show Icon Per Platform</h5>
<p margin>In this example we're using the <code>showWhen</code> directive to decide whether to show an icon based on the platform.</p>
<ion-grid>
<ion-row>
<ion-col text-center>
<ion-icon name="logo-apple" showWhen="ios"></ion-icon>
</ion-col>
<ion-col>
<code> &lt;ion-icon name="logo-apple" showWhen="ios"&gt;&lt;/ion-icon&gt; </code>
</ion-col>
</ion-row>
<ion-row>
<ion-col text-center>
<ion-icon name="logo-android" showWhen="android"></ion-icon>
</ion-col>
<ion-col>
<code> &lt;ion-icon name="logo-android" showWhen="android"&gt;&lt;/ion-icon&gt; </code>
</ion-col>
</ion-row>
<ion-row>
<ion-col text-center>
<ion-icon name="logo-windows" showWhen="windows"></ion-icon>
</ion-col>
<ion-col>
<code> &lt;ion-icon name="logo-windows" showWhen="windows"&gt;&lt;/ion-icon&gt; </code>
</ion-col>
</ion-row>
</ion-grid>
</ion-content>
<style>
.show-when-demo ion-col {
background: #f8f8f8;
border: 1px solid #ddd;
margin: 1%;
max-width: 48%;
flex: 0 0 48%;
min-height: 120px;
}
.show-when-demo code {
background: #f8f8f8;
}
.show-when-demo ion-icon {
font-size: 100px;
}
</style>

View File

@ -0,0 +1,17 @@
import { NgModule } from '@angular/core';
import { IonicPageModule } from '../../../../../src';
import { PageOne } from './page-one';
@NgModule({
declarations: [
PageOne,
],
imports: [
IonicPageModule.forChild(PageOne),
],
entryComponents: [
PageOne,
]
})
export class PageOneModule {}

View File

@ -0,0 +1,6 @@
import { Component } from '@angular/core';
@Component({
templateUrl: 'page-one.html'
})
export class PageOne {}