icon and item docs wip

This commit is contained in:
Tim Lancina
2015-08-28 15:06:07 -07:00
parent 6110daafc7
commit e985e6aeff
5 changed files with 55 additions and 6 deletions

View File

@ -6,6 +6,9 @@ import {Ion} from '../ion';
import {Button} from '../button/button';
/**
* TODO
*/
@Directive({
selector: 'icon',
properties: [
@ -20,6 +23,13 @@ import {Button} from '../button/button';
}
})
export class Icon {
/**
* TODO
* @param {ElementRef} elementRef TODO
* @param {Button} hostButton TODO
* @param {IonicConfig} config TODO
* @param {Renderer} renderer TODO
*/
constructor(
private elementRef: ElementRef,
@Optional() @Host() hostButton: Button,
@ -61,6 +71,9 @@ export class Icon {
}
}
/**
* TODO
*/
onInit() {
if (this.mode == 'ios' && this.ios) {
this.name = this.ios;

View File

@ -1,6 +1,8 @@
import {Directive, ElementRef} from 'angular2/angular2';
/**
* TODO
*/
@Directive({
selector: 'ion-item-group',
host: {
@ -8,12 +10,18 @@ import {Directive, ElementRef} from 'angular2/angular2';
}
})
export class ItemGroup {
/**
* TODO
* @param {ElementRef} elementRef TODO
*/
constructor(elementRef: ElementRef) {
this.ele = elementRef.nativeElement;
}
}
/**
* TODO
*/
@Directive({
selector: 'ion-item-group-title',
host: {
@ -22,6 +30,10 @@ export class ItemGroup {
}
})
export class ItemGroupTitle {
/**
* TODO
* @param {ElementRef} elementRef TODO
*/
constructor(elementRef: ElementRef) {
this.isSticky = true;
this.ele = elementRef.nativeElement;

View File

@ -1,13 +1,17 @@
/**
* TODO
*/
@Decorator({
selector: 'ion-primary-options'
})
export class ItemPrimaryOptions {
}
/**
* TODO
*/
@Decorator({
selector: 'ion-secondary-options'
})
export class ItemSecondaryOptions {
}

View File

@ -3,11 +3,18 @@ import {ElementRef, Host, Directive} from 'angular2/angular2';
import {Item} from 'ionic/components/item/item';
import {SlideGesture} from 'ionic/gestures/slide-gesture';
/**
* TODO
*/
@Directive({
selector: 'ion-primary-swipe-buttons'
})
export class ItemPrimarySwipeButtons {
/**
* TODO
* @param {ElementRef} elementRef TODO
* @param {Item} item TODO
*/
constructor(
elementRef: ElementRef,
@Host() item: Item
@ -19,6 +26,10 @@ export class ItemPrimarySwipeButtons {
this.gesture.listen();
}
/**
* TODO
* @param {boolean} isOpen TODO
*/
setOpen(isOpen) {
if (isOpen !== this.isOpen) {
this.isOpen = isOpen;
@ -29,6 +40,9 @@ export class ItemPrimarySwipeButtons {
}
}
/**
* TODO
*/
@Directive({
selector: 'ion-secondary-swipe-buttons'
})

View File

@ -4,7 +4,9 @@ import {ItemPrimaryOptions, ItemSecondaryOptions} from './item-options';
import {ItemPrimarySwipeButtons, ItemSecondarySwipeButtons} from './item-swipe-buttons';
import {dom} from 'ionic/util';
/**
* TODO
*/
@Component({
selector: 'ion-item,[ion-item]',
host: {
@ -21,6 +23,10 @@ import {dom} from 'ionic/util';
directives: [NgIf]
})
export class Item {
/**
* TODO
* @param {ElementRef} elementRef TODO
*/
constructor(elementRef: ElementRef) {
this._isOpen = false;
this._isSlideActive = false;