mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-16 18:17:31 +08:00
test(angular): add card demo for angular
This commit is contained in:
@ -9,6 +9,7 @@ const routes: Routes = [
|
||||
{ path: 'alert', loadChildren: 'app/alert/alert.module#AlertModule' },
|
||||
{ path: 'actionSheet', loadChildren: 'app/action-sheet/action-sheet.module#ActionSheetModule' },
|
||||
{ path: 'badge', loadChildren: 'app/badge/badge.module#BadgeModule' },
|
||||
{ path: 'card', loadChildren: 'app/card/card.module#CardModule' },
|
||||
{ path: 'toast', loadChildren: 'app/toast/toast.module#ToastModule' },
|
||||
{ path: 'loading', loadChildren: 'app/loading/loading.module#LoadingModule' },
|
||||
{ path: 'nav', loadChildren: 'app/nav/nav.module#NavModule' },
|
||||
|
72
packages/demos/angular/src/app/card/card-page.component.ts
Normal file
72
packages/demos/angular/src/app/card/card-page.component.ts
Normal file
@ -0,0 +1,72 @@
|
||||
import { Component } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-card-page',
|
||||
template: `
|
||||
<ion-app>
|
||||
<ion-page class="show-page">
|
||||
<ion-header>
|
||||
<ion-toolbar>
|
||||
<ion-title>Card</ion-title>
|
||||
</ion-toolbar>
|
||||
</ion-header>
|
||||
<ion-content>
|
||||
<ion-card>
|
||||
<ion-card-header>
|
||||
<ion-card-title>Card Header</ion-card-title>
|
||||
</ion-card-header>
|
||||
|
||||
<ion-card-content>
|
||||
Keep close to Nature's heart... and break clear away, once in awhile,
|
||||
and climb a mountain or spend a week in the woods. Wash your spirit clean.
|
||||
</ion-card-content>
|
||||
</ion-card>
|
||||
|
||||
<ion-card>
|
||||
<ion-item>
|
||||
<ion-icon name="pin" slot="start"></ion-icon>
|
||||
ion-item in a card, icon left, button right
|
||||
<ion-button fill="outline" slot="end">View</ion-button>
|
||||
</ion-item>
|
||||
|
||||
<ion-card-content>
|
||||
This is content, without any paragraph or header tags,
|
||||
within an ion-card-content element.
|
||||
</ion-card-content>
|
||||
</ion-card>
|
||||
|
||||
<ion-card>
|
||||
<ion-item href="#" class="activated">
|
||||
<ion-icon name="wifi" slot="start"></ion-icon>
|
||||
Card Link Item 1 .activated
|
||||
</ion-item>
|
||||
|
||||
<ion-item href="#">
|
||||
<ion-icon name="wine" slot="start"></ion-icon>
|
||||
Card Link Item 2
|
||||
</ion-item>
|
||||
|
||||
<ion-item class="activated">
|
||||
<ion-icon name="warning" slot="start"></ion-icon>
|
||||
Card Button Item 1 .activated
|
||||
</ion-item>
|
||||
|
||||
<ion-item>
|
||||
<ion-icon name="walk" slot="start"></ion-icon>
|
||||
Card Button Item 2
|
||||
</ion-item>
|
||||
</ion-card>
|
||||
</ion-content>
|
||||
</ion-page>
|
||||
</ion-app>
|
||||
`
|
||||
})
|
||||
export class CardPageComponent {
|
||||
constructor() {
|
||||
|
||||
}
|
||||
|
||||
toggleColor() {
|
||||
|
||||
}
|
||||
}
|
14
packages/demos/angular/src/app/card/card-routing.module.ts
Normal file
14
packages/demos/angular/src/app/card/card-routing.module.ts
Normal file
@ -0,0 +1,14 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { Routes, RouterModule } from '@angular/router';
|
||||
|
||||
import { CardPageComponent } from './card-page.component';
|
||||
|
||||
const routes: Routes = [
|
||||
{ path: '', component: CardPageComponent }
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
imports: [RouterModule.forChild(routes)],
|
||||
exports: [RouterModule]
|
||||
})
|
||||
export class CardRoutingModule { }
|
15
packages/demos/angular/src/app/card/card.module.ts
Normal file
15
packages/demos/angular/src/app/card/card.module.ts
Normal file
@ -0,0 +1,15 @@
|
||||
import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
|
||||
import { CardPageComponent } from './card-page.component';
|
||||
import { CardRoutingModule } from './card-routing.module';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule,
|
||||
CardRoutingModule
|
||||
],
|
||||
declarations: [CardPageComponent],
|
||||
schemas: [CUSTOM_ELEMENTS_SCHEMA]
|
||||
})
|
||||
export class CardModule { }
|
@ -15,6 +15,9 @@
|
||||
<li>
|
||||
<a href='badge'>Badge Page</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href='card'>Card Page</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href='actionSheet'>Action Sheet Page</a>
|
||||
</li>
|
||||
|
Reference in New Issue
Block a user