refactor(item-groups): updated item groups demo to latest code

This commit is contained in:
Brandy Carney
2015-11-16 15:42:59 -05:00
parent b97aea3dbc
commit c6b15d63fe
3 changed files with 14 additions and 13 deletions

View File

@ -4,10 +4,12 @@
{{data.day}} - Sessions
</ion-item-group-title>
<ion-item-sliding *ng-for="#session of data.sessions">
<h3>{{session.name}}</h3>
<p>
<span>{{session.location}}</span>
</p>
<button ion-item>
<h3>{{session.name}}</h3>
<p>
<span>{{session.location}}</span>
</p>
</button>
<ion-item-options>
<button primary>Speaker Info</button>
<button secondary>Add to <br>Favorites</button>

View File

@ -1,21 +1,20 @@
import {ElementRef, Host} from 'angular2/angular2';
import {Component, View, NgIf, NgFor} from 'angular2/angular2';
import {App, Content, Icon, Item, ItemGroup, ItemGroupTitle, ItemSliding, List, ListHeader, NavController} from 'ionic/ionic';
import {Component, NgIf, NgFor} from 'angular2/angular2';
import {App, Icon, Item, ItemGroup, ItemGroupTitle, ItemSliding, List, ListHeader, NavController} from 'ionic/ionic';
@Component({
properties: ['data'],
selector: 'component-list',
directives: [ComponentList, Item, ItemGroup, ItemGroupTitle, ItemSliding, List, NgIf, NgFor],
directives: [Item, ItemGroup, ItemGroupTitle, ItemSliding, List, NgIf, NgFor],
templateUrl: 'component-list.html'
})
class ComponentList {
constructor(elementRef: ElementRef, @Host() content:Content) {
console.log('Component List init', content);
export class ComponentList {
constructor() {
}
}
@App({
directives: [Content, ComponentList, Item, ItemGroup, ItemGroupTitle, ItemSliding, List, NgIf, NgFor],
directives: [ComponentList],
templateUrl: 'main.html'
})
class E2EApp {

View File

@ -1,4 +1,4 @@
<ion-toolbar><ion-title>Item Groups</ion-title></ion-toolbar>
<ion-content class="outer-content content-selected">
<h4>Component List</h4>
<component-list [data]="data"></component-list>
</ion-content>