tim checkbox

This commit is contained in:
Adam Bradley
2015-06-19 14:13:12 -05:00
parent bab40cebdc
commit 2479902ddf
3 changed files with 13 additions and 3 deletions

View File

@@ -6,13 +6,14 @@ import {View} from 'angular2/src/core/annotations_impl/view';
//import {ControlGroup, ControlDirective} from 'angular2/forms';
import {IonicComponent} from '../../config/component';
import {Icon} from '../icon/icon';
@IonicComponent(Checkbox)
@View({
template: `
<div class="item-media media-checkbox">
<icon class="checkbox-off"></icon>
<icon [name]="timsIcon" class="checkbox-off"></icon>
<icon class="checkbox-on"></icon>
</div>
@@ -20,7 +21,8 @@ import {IonicComponent} from '../../config/component';
<div class="item-label">
<content></content>
</div>
</div>`
</div>`,
directives: [Icon]
})
export class Checkbox {
@@ -49,6 +51,9 @@ export class Checkbox {
) {
this.domElement = elementRef.domElement
this.domElement.classList.add('item')
this.timsIcon = 'hi-tim'
// this.controlDirective = cd;
// cd.valueAccessor = this;

View File

@@ -19,7 +19,7 @@ import {IonicComponent} from '../../config/component';
template: `
<nav class="navbar-container tab-bar-container">
<div class="tab-bar" role="tablist">
<button *ng-for="#t of tabs" [tab]="t" class="tab-button" role="tab">
<button *ng-for="#t of tabs" class="tab-button" role="tab">
<icon [name]="t.tabIcon" class="tab-button-icon"></icon>
<span class="tab-button-text">{{t.tabTitle}}</span>
</button>

5
ionic/config/config.js Normal file
View File

@@ -0,0 +1,5 @@
export class IonicConfig {
}