chore: allow you to use ionic!

This commit is contained in:
Andrew
2015-03-17 19:25:55 -05:00
parent df34a33736
commit 9e3d601ff9
32 changed files with 214 additions and 86 deletions

View File

View File

View File

View File

View File

@@ -1,8 +1,20 @@
class Ion {
assign(...args) {
for (let obj of args) {
//...extend this
var ILLEGAL_ASSIGN_FIELDS = {};
export class Ion {
assign() {
for (var i = 1, ii = arguments.length; i < ii; i++) {
var obj = arguments[i];
if (obj) {
var keys = Object.keys(obj);
for (var j = 0, jj = keys.length; j < jj; j++) {
var key = keys[j];
if (!ILLEGAL_ASSIGN_FIELDS[key]) {
this[key] = obj[key];
}
}
}
}
}
}

View File

View File

@@ -1,4 +1,4 @@
/*
import {TabbarConfig} from '/components/tabbar/tabbar';
import {Draggable} from '/behaviors/draggable';
@@ -15,6 +15,5 @@ TabbarConfig.platform('android')
});
});
/*
<ion-tabs config-platform-android />
*/

View File

@@ -1,3 +1,14 @@
import {Component, Template} from 'angular2/angular2';
import {Ion} from '../ion';
class Tabbar extends Ion {
@Component({
selector: 'tabbar',
bind: {
title: 'view-title'
}
})
@Template({
inline: `<div>Tabbar: {{title}}</div>`
})
export class Tabbar extends Ion {
}

View File