mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
chore: allow you to use ionic!
This commit is contained in:
@@ -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];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -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 />
|
||||
*/
|
||||
|
||||
@@ -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 {
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user